1)
I am trying to understand the TradeCollection class, but I am having difficulties and I
am doing something wrong. Unfortunately I could not figure out the problem...
I added the following to a strategy :
protected override void OnTermination()
{
double sharpe= Performance.AllTrades.TradesPerformance.Percent.Av gProfit / Performance.AllTrades.TradesPerformance.Percent.St dDev;
Print("Calculated Sharpe "+sharpe+" Sharpe "+Performance.AllTrades.TradesPerformance.SharpeRa tio);
}
The result of my calculation differs form the built-in SharpeRatio.
What is wrong with my sharpe calculation ? How can I correct it ?
2)
I would also like to calculate the downside risk ( http://en.wikipedia.org/wiki/Downside_risk ).
I am not sure if the below statement is correct:
Performance.AllTrades.LosingTrades.TradesPerforman ce.Percent.StdDev
How can I calculate the downside risk ?
Thank you for the help,
Arnold

Comment