Is there a good way to display Max Drawdown, Sharpe Ratio, and other stats from the PortfolioStatistics class?
Is there an instance of that which is reachable from the QCAlgorithm instance at runtime?
For quick comparisons to Quantopian algorithms during translation it would be really handy to at have these on display:
SetRuntimeStatistic("Drawdown", QuantConnect.Statistics.AlgorithmPerformance.PortfolioStatistics.Drawdown);
SetRuntimeStatistic("Alpha", QuantConnect.Statistics.AlgorithmPerformance.PortfolioStatistics.Alpha);
SetRuntimeStatistic("Beta", QuantConnect.Statistics.AlgorithmPerformance.PortfolioStatistics.Beta);
SetRuntimeStatistic("Sharpe Ratio", QuantConnect.Statistics.AlgorithmPerformance.PortfolioStatistics.SharpeRatio);
While tracking through the code I found PortfolioStatistics is used mainly in StatisticsBuilder which is only used in Engine at the end of a run. If there is no other way to get these stats at runtime currently, are there any objections to adding support for that?
Jared Broad
Yes good idea Danny. Its been something we've discussed for a while. I've made a ticket here documenting the request and would welcome assistance implementing it! Once its implemented in LEAN we can install it into the cloud fairly easily.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Danny
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!