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

Add fit method to each model #18

Open
jason-ash opened this issue Nov 12, 2019 · 0 comments
Open

Add fit method to each model #18

jason-ash opened this issue Nov 12, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@jason-ash
Copy link
Owner

Allow stochastic models to be fit with historical data. This seems like a BIG task, but important.

Ideas that may be relevant:

  • use MLE where appropriate, or possible
  • use the "Exact Algorithm"
  • add a _transition_density property to each model, where it exists

def fit(self, X: np.ndarray, y: np.ndarray):
"""
Fits the parameters of the diffusion process based on historical data.
The exact method of fitting should be defined at the subclass level, because the
implementation can vary depending on the model.
Parameters
----------
X : np.ndarray, the indices of times/dates of the observed prices
y : np.ndarray, the observed prices or values on the given dates. If multiple
indices, then y will be a matrix, where the columns are the indices.
Returns
-------
self
"""
raise NotImplementedError()

@jason-ash jason-ash added the enhancement New feature or request label Nov 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant