PureBytes Links
Trading Reference Links
|
Newby needs help.
I am interested in code that allows me to look at Ulcer Index and
Ulcer Performance Index for individual issues. Marcin was good enough
to point me to code written by Ken Close and then modified by TJ but
I still cannot get it to work. When run in Explore I'm told
that "variable Buy is used without being initialized".
Is it enough to place "Buy = 1" as first line in code or does this
distort results?
Here's code
Filter = Buy OR Sell;
Eq=Equity(0,0);
Per = 252;
Per2 = 40;
Cdd = (HHV(Eq,Per2) - Eq)/HHV(Eq,Per2);
MaxCdd = HHV(Cdd,252)*100;
R2 = (Sum(Cdd*Cdd,Per))/Per;
UI = 100*sqrt(R2);
Gain = Eq/Ref(Eq,-Per);
ANN = 100 * ((Gain^(252/Per)) - 1);
UPI = (ANN - 0.054)/UI;
AddColumn(MaxCdd,"MaxCdd",1.2);
AddColumn(ANN,"ANN",1.2);
AddColumn(UPI,"UPI",1.3);
AddColumn(ANN/MaxCdd,"ANN/dd",1.3);
Thanks
Dave
------------------------ Yahoo! Groups Sponsor --------------------~-->
Has someone you know been affected by illness or disease?
Network for Good is THE place to support health awareness efforts!
http://us.click.yahoo.com/Rcy2bD/UOnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~->
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|