I am currently factoring out reusable classes of my application on QC algorithm lab, into a library. Unfortunately, this is not going well, as files are simply vanishing in what appears to be a random manner.
For example.
I move a file from my project to my new library as follows: create a new file in the library, then copy and paste the file contents from the existing file to the new one, then delete the old file.
All appears okay for a while. I am able to build the library and the algo project and it all works as expected. However, when I close the either project and then reopen it, files have sometimes vanished! Also, files sometimes reappear in the original project.
My first thought was that there is some sort of interference occurring between the library and algo projects and I should not be using different tabs in the same browser for the two projects, but should instead use completely independent browser windows for each. This has unfortunately made no difference.
This turn of events has shattered my confidence in the Algorithm lab, for obvious reasons. I would greatly appreciate any help you can offer me in solving this issue.
Thank you :)
Louis Szeto
Hi Yigal
Did you save your library in the name of form: “Library/yourlibrary.py” or “Library/yourlibrary.cs” ? That should work. Sometimes the AWS is like this to disconnect, refresh then repeat to do so shall be saved.
Cheers
Louis
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Louis Szeto
Hi Yigal,
I think I've reproduce your problem. Few points to see if possible to solve your case:
Cheers
Louis
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Yigal Rachman
Further thoughts:
I am using a different namespace for my library code: "Albertagypsy". The compilation seems to recognize this as expected. However, is it possible that Algorithm Lab file management gets confused? Should I just be sticking with namespace QuantConnect for everything?
Louis Szeto
Hi Yigal
Then you may just change the above code “using Quantconnect;” into “using Albertagypsy;”.
Cheers
Louis
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Yigal Rachman
Hi Louis:
Thank you for your very quick and detailed response - much appreciated :).
As far as I can tell, I had already done exactly as you have described, and yet I experienced the problem with files disappearing. Worst part is that it does not happen every time. I am investigating further..
Cheers,
Yigal
Jared Broad
Thanks for the report. I see you've opened a support ticket. We'll follow up there and fix the bug.
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Yigal Rachman
My code has "using Alberta Gypsy" when QC is malfunctioning.
I suspect the problem is because while I am transitioning a module from a
project to the library, it exists in both places with the same name.
Should not be a problem, but perhaps QC has a bug that confuses the two
files, and then loses one of them - usually the library one?
Cheers,
Yigal
Yigal Rachman
Yigal Rachman
Okay, I have figured out what is happening.
1. I create my library: AlbertagypsyLib
2. I add a new file to it: MyQCAlgoBase.cs
3. I build it
4. I build my existing project: Covered calls weekly, which references
AlbertagypsyLib and uses MyQCAlgoBase.cs
5. MyQCAlgoBase.cs appears as a new file in Covered calls weekly - I did
not expect this!
1. Why is it showing up in the referencing project?
2. If I edit it, the change shows up in the library version after a
refresh, so both the library and application must be referencing
the *same*
file! I have been deleting the file in the application, which is why the
library file has been vanishing!
So at least the mystery is now solved and I feel a lot better about QC.
However, why are the library files showing up in the referencing
application? Is this correct? Surely not?
Thank you and best regards,
Yigal
Yigal Rachman
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!