top of page
Search

Building a Backtesting Engine

  • Writer: Sanjana Rajesh
    Sanjana Rajesh
  • Mar 10, 2024
  • 1 min read

This project uses python for data acquisition and preprocessing, and the backtesting engine has been built with C++. The engine fetches historical stock data from Yahoo Finance. The data is then processed and includes adjustments for stock splits and dividends.


Some key features:

  1. Simulation & Analysis: The c++ backtesting engine simulates trading strategies and computes portfolio values, daily returns, and implementing portfolio rebalancing based on predefined target allocations.

  2. Risk Metrics: Volatility, maximum drawdown and sharpe ratio have been calculated

  3. Scalability: It handles portfolios of varying sizes


Here is an example result for a portfolio consisting of equity stocks (AAPL, MSFT, GOOGL, AMZN, META, TSLA, NVDA, NFLX, ADBE, PYPL)


Dependencies:

  1. Python Libraries - yfinance, pandas, numpy, datetime

  2. C++ libraries - standard C++ libraries for file handling, data structures and numerical computations.


 
 
 

Recent Posts

See All

Comments


bottom of page