Hi QC Community

Sharpe Ratio is one of the golden standard benchmarks to track an asset/a portfolio's risk-adjusted return. In this post, we're showing an example of how to add this measure into your algorithm.

  1. Create a SharpeRatio indicator
  2. Create a RollingWindow to store the SR indicator values.
  3. Call .Updated to set up an indicator update handler to update the RollingWindow when an indicator data point is received.
  4. Create a scheduled event every day to update the indicator with time and the end-of-day portfolio value/assets' price. This new data point update will elicit the update handler to run.


Best
Louis

Author