Back

How to preserve my settings config.json when upstream version change?

Hello, 

I work on backtesting-desktop environment. In the process of exploring LEAN, there were a number of times when I had to wipe out and reinstall LEAN completely. 

Every time I do this, I have to edit Launcher/config.json.  I could have made a backup and replace the one comes with LEAN download. But the problem is that it seems config.json itself is also evolving, so a simple replacment using an old backup is risky. Not to mention that editing config.json itself can cause problem if you are not careful enough.

So my questions is: is it possible a user can write those key:value pairs to a separate file and when LEAN start up, it use layer this separate file on the top of Launcher/config.json, replacing any key:value pairs in Launcher/config.json if the same key is found in the user created file.

That way, not only we can migrate our setting easier ( of course there's still a risk of key:value pairs change over different version), it may also reduce the chance of corrupting the other settings in config.json during editing and create additional support workload for QuantConnect team.

Update Backtest








Are you using Git? The task you described can be handled with it.
Please checkout our Contributor's Guide for a quick tutorial.

0

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.


Thanks for the suggestion Kow; assuming the rest of your LEAN project isn't changed you can do a "git stash" and "git stash apply" to hide your config, then put it back in place using git. This will effectively "merge" them like you want using git. 

0

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.


Update Backtest





0

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.


Loading...

This discussion is closed