@multi_byte-wildebeest Hello.
How to get the Sharpe Ratio is in the Quick Start template.
https://github.com/quantiacs/strategy-q20-nasdaq100-quick-start/blob/master/strategy.ipynb
or
import qnt.output as qnout qnout.check(weights, data, "stocks_nasdaq100")or
stat = qnstats.calc_stat(data, weights) display(stat.to_pandas().tail())or
import qnt.graph as qngraph statistics = qnstats.calc_stat(data, weights) display(statistics.to_pandas().tail()) performance = statistics.to_pandas()["equity"] qngraph.make_plot_filled(performance.index, performance, name="PnL (Equity)", type="log") display(statistics[-1:].sel(field=["sharpe_ratio"]).transpose().to_pandas()) qnstats.print_correlation(weights, data)Please look at this post
https://quantiacs.com/community/topic/515/what-is-forward-looking-and-why-it-s-effective-badly-to-strategy/6?_=1711712434795