Skip to content

Problem with data_type='portfolio' in predict function #25

@MocaStreet

Description

@MocaStreet

Hi author, I tried to do out-of-sample prediction for portfolio but realized that there is no data_type parameter in the predictOOS function, so I tried to run "Ypred = regr.predict(X=data_OOS, data_type='portfolio', mean_factor=True)". In your source code predict function exists such a parameter as data_type, but if you run the above code, it selects the elif that X is not None, and then runs pred = self.predict_portfolio(W, L, T, mean_factor), but the values of L and T are not returned in the elif. This makes it impossible to predict the out-of-sample portfolio. my solution is to calculate the values of W, L and T myself and then run the predict_portfolio function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions