This project explores two quantitative finance techniques using Python in QuantConnect:
- Monte Carlo Simulation: Models possible future price paths of Ralph Lauren (RL) stock.
- SMA Crossover Backtest: Tests a 10-day vs. 50-day Simple Moving Average (SMA) trading strategy to evaluate historical performance and risk.
I built this project to strengthen my programming and quantitative finance skills:
- Learned how to implement Monte Carlo simulations in Python.
- Gained experience with backtesting trading strategies.
- Developed a better understanding of Python functions, syntax, and files.
- Important Note: This project will only be able to be run in QuantConnect. This code needs (Lean Engine) for backtesting and needs to be able to access QuantConnect's free API.
When I started, I had minimal Python experience — this project was a great interactive way to learn both coding and market modeling.
- QuantConnect (Lean Engine) for backtesting
- Python for coding simulations and strategies
Special thanks to the YouTube channel QuantProgram for troubleshooting guidance on QuantConnect throughout the project.
main.py
→ Algorithm code (Monte Carlo + SMA crossover)research.ipynb
→ Research script exploring RL with Bollinger BandsREADME.md
→ Project documentationresults.json
→ Full written results downloaded from QuantConnect. The essential results are pictured below.Strategy Equity.png
→ Equity curve of the strategyDrawdown.png
→ Historical drawdown chartAssets Sales Volume.png
→ Trading activity and sales volumePortfolio Margin.png
→ Portfolio margin usageOverview 1.png
,Overview 2.png
→ Sharpe ratio, win rate, average win/loss, total orders, net profit, and more statistics.