Help in changing my codes from series to matrix

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator

sudesh
Posts: 51
Joined: Fri Nov 03, 2017 7:30 pm

Re: Help in changing my codes from series to matrix

Postby sudesh » Sat Mar 24, 2018 7:44 pm

Hi Matt,

Last question, the code is working however I'm loosing some of the data from the start of the series.

For example, the threshold starts 01 mars 1974 however the signal is starting only from 14 october 1977.

I have enclosed the program and the expected series.

Thanks alots.

It's really appreciated to help me on your free time.

Sudesh
Attachments
backtesting_eviews_optimisation_signal pourcent.prg
(5.63 KiB) Downloaded 10 times
Optimisation signal pourcent.xlsx
(123.11 KiB) Downloaded 11 times

EViews Matt
EViews Developer
Posts: 237
Joined: Thu Apr 25, 2013 7:48 pm

Re: Help in changing my codes from series to matrix

Postby EViews Matt » Mon Mar 26, 2018 10:07 am

That's almost certainly due to the lag dependence in the signal, i.e., for the first observation in your sample {%sig}(-1) is NA, which propagates to later observations until you get to a case number that doesn't depend on {%sig}(-1), such as case number 9 in the example you posted. In the statement that generates the signal values, try replacing all the "{%sig}(-1)" with "@nan({%sig}(-1), 0)". That will cause NAs to be treated as a signal of 0.

sudesh
Posts: 51
Joined: Fri Nov 03, 2017 7:30 pm

Re: Help in changing my codes from series to matrix

Postby sudesh » Mon Mar 26, 2018 12:52 pm

Thanks alots Matt..


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 4 guests