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

Create context Field Inside Strategy #6

Open
maxholloway opened this issue Jun 28, 2020 · 0 comments
Open

Create context Field Inside Strategy #6

maxholloway opened this issue Jun 28, 2020 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers p2 High Priority (priority 2)

Comments

@maxholloway
Copy link
Owner

Create context Field Inside Strategy

Motivation

There may be things that a user wants to store throughout the backtest to use across various methods.

Interface

A dictionary called context that lives in the Strategy compound type.

Implementation

  1. Add an optional context argument to the StrategyOptions constructor, and update the StrategyOptions type definition to reflect this change.
  2. [Optional] Modify the function signatures for user-defined so that context was explicitly passed as an argument. This would make it clearer than accessing it via strat.options.context, which may be unclear from a developer's perspective (i.e. users may ask "Why is context stored in the options namespace"?).
@maxholloway maxholloway added enhancement New feature or request good first issue Good for newcomers p2 High Priority (priority 2) labels Jun 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers p2 High Priority (priority 2)
Projects
None yet
Development

No branches or pull requests

1 participant