{"id":12,"date":"2022-04-12T20:50:17","date_gmt":"2022-04-12T20:50:17","guid":{"rendered":"https:\/\/blogs.oregonstate.edu\/steve\/?p=12"},"modified":"2022-04-12T20:50:17","modified_gmt":"2022-04-12T20:50:17","slug":"quantconnect-lean","status":"publish","type":"post","link":"https:\/\/blogs.oregonstate.edu\/steve\/2022\/04\/12\/quantconnect-lean\/","title":{"rendered":"QuantConnect Lean"},"content":{"rendered":"\n<p>Last week I spent some time learning the basics of QuantConnect Lean, the engine that our group is using to create our stock market trading algorithms. I have no experience with algorithmic trading, so it took a good amount of effort to get comfortable with running basic algorithms using the engine. To complicate things further, there are also two options for backtesting algorithms: one is to clone the Lean repository, update a configuration file with the specific algorithm(s) and its language (Python or C#) that you are looking to run, and then to build and run the solution using Visual Studio. <\/p>\n\n\n\n<p>My approach was to first learn how to use the local method to make sure that I understood what was going on behind the scenes before using the more abstract CLI method. Luckily, Lean provides a sample algorithm that is automatically configured by default. So once I figured out how to update the configuration file and build and run the solution, I was able to confirm that I backtested the algorithm successfully because I was presented with metrics that would have contained meaningful data if a real algorithm was used.<\/p>\n\n\n\n<p>The CLI method actually took more effort to get up and running because it required some more specific installations (e.g., required Anaconda), but once I learned the basic commands to create and backtest a project, I definitely found it simpler to use that the local method. I received some help from my teammate Travis to create a basic algorithm that mocked making purchases of the stock UDOW over a one-year period using price data provided by Yahoo Finance. After some trial and error I was pleased to see that the algorithm was working correctly and I could see many interesting metrics that were now meaningfully populated. I am looking forward to learning more about QuantConnect Lean and am hoping to create some advanced and effective trading algorithms over the next couple of months!<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last week I spent some time learning the basics of QuantConnect Lean, the engine that our group is using to create our stock market trading algorithms. I have no experience with algorithmic trading, so it took a good amount of effort to get comfortable with running basic algorithms using the engine. To complicate things further, [&hellip;]<\/p>\n","protected":false},"author":12321,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-12","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.oregonstate.edu\/steve\/wp-json\/wp\/v2\/posts\/12","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.oregonstate.edu\/steve\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.oregonstate.edu\/steve\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/steve\/wp-json\/wp\/v2\/users\/12321"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/steve\/wp-json\/wp\/v2\/comments?post=12"}],"version-history":[{"count":1,"href":"https:\/\/blogs.oregonstate.edu\/steve\/wp-json\/wp\/v2\/posts\/12\/revisions"}],"predecessor-version":[{"id":13,"href":"https:\/\/blogs.oregonstate.edu\/steve\/wp-json\/wp\/v2\/posts\/12\/revisions\/13"}],"wp:attachment":[{"href":"https:\/\/blogs.oregonstate.edu\/steve\/wp-json\/wp\/v2\/media?parent=12"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/steve\/wp-json\/wp\/v2\/categories?post=12"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/steve\/wp-json\/wp\/v2\/tags?post=12"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}