Dear Alphien team,
Hello, I could not pass the portfolio.stressTestCheckWeightsStartDate. Below is the error message.
Error in portfolio.stressTestCheckWeightsStartDate(strat = stratNew, expectedStartDate = "2004-01-02") :
Please ensure the weights are generated from: 2004-01-02
However, in my portAllocation@weightsMatrix, my first date is on 2003-07-01 which fulfils the criterion.
> portAllocation@weightsMatrix
DM SP NQ VG Z SMix NX HI KM XP TU FV TY US RX G JB XM GC
2003-07-01 0.0 0.2 0.2 0.0 0.0 0.0 0.2 0.0 0.2 0.0 0.0 0.0 0.0 0.2 0.0 0.0 0.0 0.0 0
2004-05-11 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.2 0.0 0.0 0.0 0.2 0.2 0.2 0.2 0
2004-06-07 0.0 0.2 0.2 0.0 0.0 0.0 0.2 0.0 0.0 0.2 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.2 0
2004-07-08 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.2 0.2 0.2 0.2 0.0 0.0 0.2
Could you please help me with this issue?
Thank you!
Comments (7)
Hello, is it failing during the step where an environment with missing data is simulated? If so, can you try using the createMissingData method to simulate an environment with NAs in data? the code below should help you with checking the behaviour of the payout
port.createMissingData()
port.evaluate(zoom = "2003::2018")
port.weightsMatrix
Thank you YongCheng!
It is failing during the step when missing data is simulated, and now I rewrite the code and it can generate weight before 2004-01-02 when there is missing data.
However, I have another problem:
when i evaluate the portfolio with missing data, the error is "length of dimnames not equal to array extent'' . May i ask what may cause this error?
Thank you!
Hi Zhou. Thanks for the follow up.
this looks like your payout is unable to be ran with missing data. can you try running your payout with the features from port1?
something like the below
payout(port1@features)
you can contact me on alphachat.alphien.com if anything is still unclear
Hi Yongcheng,
Thank you for your help! Now i solved the missing data issue, but I encountered another error when submitting the strategy.
The error is "some of my payouts are not in Qlib'. I have checked the wiki page, but I am not sure what caused the problem. Could you please help me with this problem? What might be the causes of this error? Thank you!
Hi Zhou,
It seems that you've defined your payout in the function 'strategy1' which you are just defining in the notebook. You need to publish this function in the Qlib, which is a repository of all your User Defined Functions.
Please look at this documentation (last step: publishing a payout)
https://dashboard.alphien.com/knowledge-base/Creating_a_payout
Manas
Hello Manas,
Thank you for your help! I will try now
Dear Manas,
Hello! Our team has just made our first submission. Thank you for your help and we look forward to your review!
Best regards,
Zhou