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

[amibroker] Re: help with custom metric



PureBytes Links

Trading Reference Links

Hi again!

Any ideas about following message?

PS I forgot that text editor would not accept greek characters when  writing first mail. Therefore every "O" symbol in the previous message means in fact greek "sigma" - a math symbol for a sum. Sorry for the inconvinience.


--- In amibroker@xxxxxxxxxxxxxxx, "tf28373" <tomfid@xxx> wrote:
>
> 
> Hi!
> 
> I've been trying to add custom metric to backtester and optimization
> funcionalities called AIRAP
> <http://www.futures.pl/res_tmp/Hedge%20Quest%20-%20Summer%202005.pdf>  
> (Alternative Investment Risk Adjusted Performance), which is composed as
> follows:
> 
> AIRAP = [  Ó (( 1 +   TRi ) ^ (-3))/N ] ^ ( -1/3 ) -1, where  TRi  is
> i-th trade profit and N is number of trades.
> 
> I've come to following code:
> 
> SetCustomBacktestProc("");//AIRAP
> 
> if(Status("action")==actionPortfolio)
> 
> {bo=GetBacktesterObject();
> 
> bo.Backtest();
> 
> st=bo.GetPerformanceStats(0);
> 
> airap=
> 
> ((1+st.GetValue("NetProfit")^(-3))
> 
> /st.GetValue("AllQty")
> 
> )^(1/(-3))-1;
> 
> bo.AddCustomMetric("AIRAP",airap);}
> 
> However I don't know how to include the sum of this equation part: (( 1
> +   TRi ) ^ (-3))/N , in other word I cannot implement "Ó". I've been
> trying to achieve that using <sum()> function, without success though.
> 
> Can you show me some way to transcript AIRAP equation into AFL? Maybe
> there is some part of User Guide dealing with this issue which I've
> overlooked or some papers on that in Knowledge Base?
> 
> I will be grateful for any advice or trace :)
> 
> Regards
> 
> Tomasz
>




------------------------------------

**** 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/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> 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/