Sum of Squares

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator

petter
Posts: 6
Joined: Wed Aug 03, 2016 4:07 pm

Sum of Squares

Postby petter » Mon Aug 29, 2016 5:27 am

Hi, I'm doing my master thesis now and I wondered if there is a way to calculate the sum of squred differenceof 87 stocks. I want the sum of AB, AC... BC, BD etc. Im doin pairs trading as topic

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13319
Joined: Tue Sep 16, 2008 5:38 pm

Re: Sum of Squares

Postby EViews Gareth » Mon Aug 29, 2016 8:23 am

You'll have to either calculate each one manually, or write a quick program with a for loop to loop through them, using the @sumsq function.
Follow us on Twitter @IHSEViews

petter
Posts: 6
Joined: Wed Aug 03, 2016 4:07 pm

Re: Sum of Squares

Postby petter » Mon Aug 29, 2016 8:48 am

is it difficult to write such a program?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13319
Joined: Tue Sep 16, 2008 5:38 pm

Re: Sum of Squares

Postby EViews Gareth » Mon Aug 29, 2016 9:20 am

No.

Read the programming chapter of the Command and Programming Reference, and read through this thread:
viewtopic.php?f=5&t=1638
Follow us on Twitter @IHSEViews

petter
Posts: 6
Joined: Wed Aug 03, 2016 4:07 pm

Re: Sum of Squares

Postby petter » Mon Aug 29, 2016 12:42 pm


EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13319
Joined: Tue Sep 16, 2008 5:38 pm

Re: Sum of Squares

Postby EViews Gareth » Mon Aug 29, 2016 1:44 pm

If you were using Excel...
Follow us on Twitter @IHSEViews

petter
Posts: 6
Joined: Wed Aug 03, 2016 4:07 pm

Re: Sum of Squares

Postby petter » Mon Aug 29, 2016 1:50 pm

I can't figure out the programming, could you help me out?


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 25 guests