Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Custom Statistics For Python #7544

Open
4 tasks done
AlexCatarino opened this issue Oct 30, 2023 · 2 comments
Open
4 tasks done

Support Custom Statistics For Python #7544

AlexCatarino opened this issue Oct 30, 2023 · 2 comments
Labels

Comments

@AlexCatarino
Copy link
Member

Expected Behavior

Use case: we don't want to consider non-trading and/or no-holdings days in the Statistics.

Actual Behavior

Only C#.

Potential Solution

Create IStatisticsServicePythonWrapper and add PyObject overload to SetStatisticsService.

Reproducing the Problem

New feature.

Checklist

  • I have completely filled out this template
  • I have confirmed that this issue exists on the current master branch
  • I have confirmed that this is not a duplicate issue by searching issues
  • I have provided detailed steps to reproduce the issue
@jsehnert101
Copy link

Requested custom statistics in Python to better reflect the underlying characteristics of a trading strategy. For equity-based trading strategies, there is no/negligible opportunity cost during non-trading days (i.e. weekends), so their inclusion will underestimate volatility and average returns, consequently impacting metrics like the Sharpe ratio. In the presence of multiple return streams, one may be less concerned with the opportunity cost of their investment / cash positions of a single return stream - particularly those that are discreet in nature - and more concerned with capturing its behavior in absence of an opportunity cost. Custom statistics will allow users to make their own assumptions on the meaningfulness of the aforementioned concepts.

@Martin-Molinero
Copy link
Member

This use case will be covered by #7690, where we are adding a new algorithm setting TradingDaysPerYear where the user can overwrite the default value used for calculating statistics, default to 252, except for crypto brokerages which will use 365

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants