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

Algorithm's Setting: Custom TradingDaysPerYear property #1579

Closed
3 tasks done
Romazes opened this issue Jan 16, 2024 · 1 comment
Closed
3 tasks done

Algorithm's Setting: Custom TradingDaysPerYear property #1579

Romazes opened this issue Jan 16, 2024 · 1 comment

Comments

@Romazes
Copy link
Contributor

Romazes commented Jan 16, 2024

Expected Behavior

Currently, the TradingDaysPerYear parameter can be set in the algorithm settings. If the user does not set it explicitly, it is expected to be automatically configured based on either the BrokerageModel or default to 252.

For instance:
public override void Initialize()
{
  Settings.TradingDaysPerYear = 200;
}

Also, It will be depending from BrokerageModel:

  • Cryptocurrency Exchanges => 365 days;
  • Traditional Stock Exchanges => 252 days;
For instance:
public override void Initialize()
{
  SetBrokerageModel(BrokerageName.Coinbase, AccountType.Cash);
}

Actual Behavior

Use hardcoded value TradingDaysPerYear = 252 for both Cryptocurrency Exchanges and Traditional Stock Exchanges. Unfortunately, Cryptocurrency Exchanges should use 365 days. It ruins to calculate right statistics of Algorithm.

Related Issue and PR

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
@AlexCatarino
Copy link
Member

Closed by 967f671

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

No branches or pull requests

2 participants