[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Annual Returns



PureBytes Links

Trading Reference Links

NewYear = Year() != Ref( Year(), 1 );

StartValue = ValueWhen( NewYear, Close, 2 );

EndValue1 = ValueWhen( NewYear, Close, 1 );

Filter = NewYear;

AddColumn(Year(), "Year", 1.0 );

AddColumn(100*( EndValue1 - StartValue )/StartValue, "Percentage change" );

----- Original Message -----
Sent: Sunday, February 22, 2009 4:04 AM
Subject: [amibroker] Annual Returns

I have been looking at a backtest on an index going back to 1950.
Is there a way to calculate or display the return for each individual
calendar year?

Like so:

1950 2.5%
1951 -1.9%
1952 12.3%
etc.

Steve



__._,_.___


**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___