-
Notifications
You must be signed in to change notification settings - Fork 8
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
Calling cov_pred_finance
from cvx_portfolio
?
#83
Comments
@enzbus Thank you for that. Dealing with NaNs is an interesting question. I don't want to throw an error if an asset joins later. At the same time I don't want to interpolate its missing history with zero returns (in particular before an asset awakes) Also, I want to avoid dictating how we treat missing values. It's the responsibility of the user to submit good estimates and make the combination exercise not falling over if a covariance matrix contains a NaN row and a NaN column (enough to check the diagonal). This is simple with pandas. I doubt it would be a good idea to create a dependency on cvxportfolio within cov_pred_finance (BaseForecast?). |
For sure cov_pred_finance should have no dependency on cvxportfolio. It
of course would be used with it, but it cannot depend on it.
…On Sat, Jul 15, 2023 at 8:33 PM Thomas Schmelzer ***@***.***> wrote:
@enzbus <https://github.com/enzbus> Thank you for that.
Dealing with NaNs is an interesting question. I don't want to throw an
error if an asset joins later. At the same time I don't want to interpolate
its missing history with zero returns (in particular before an asset awakes)
Also, I want to avoid dictating how we treat missing values. It's the
responsibility of the user to submit good estimates and make the
combination exercise not falling over if a covariance matrix contains a NaN
row and a NaN column (enough to check the diagonal). This is simple with
pandas.
I doubt it would be a good idea to create a dependency on cvxportfolio
within cov_pred_finance (BaseForecast?).
We could add a simple iterator (over time) combining covariance matrices
and yielding an estimate for each time t.
It should be easy to use this within cvxportfolio.
—
Reply to this email directly, view it on GitHub
<#83 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAT4UNVWVURMWMGTS64MJTDXQNOJHANCNFSM6AAAAAA2LIQB5Y>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Bumping this; in the meantime |
Hello @tschm and @kasperjo. I've been looking at this repository and your paper and I think it would be easy to write a class that wraps the functionality you provide to integrate in
cvxportfolio
. In the simplest case it would be something likeIt would be invoked simply by the user and operate completely independently, so the user doesn't have to worry about passing data in the right format, .... (See the examples to see what I mean.) All the cvxpy operations are done from cvxportfolio, and it also takes care of adding and removing assets from the universe as IPOs and bankruptcies happen.
I'm not sure if your method is safe against missing values (
past_returns
could havenan
at the top of some of the columns) but if not you can just throw an error if the user provides such data.This could even just be in your examples (or
cvxportfolio
's) and not in any package proper, to not change dependencies.If you want I can help you to interface with some more of the more advanced facilities, like multi-period forecasting (provide forecast at time t for covariance at time t+tau), on- and off-line caching (which saves on disk expensive computation, safely against parallel execution), ....
The text was updated successfully, but these errors were encountered: