Skip to content

Add fit method to each model #18

Description

@jason-ash

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()

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions