Skip to content

About

C++ CLI that reads daily prices from CSV and reports returns, volatility, max drawdown and rolling 20-day volatility

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Price analytics CLI (C++)

A command-line tool that reads a daily price series from a CSV file and reports basic return and risk statistics.

What it reports

  • Average daily return and daily volatility (sample standard deviation)
  • Annualised return (× 252) and annualised volatility (× √252)
  • Best and worst day
  • Maximum drawdown (largest fall from a running peak) and its date
  • Peak 20-day rolling volatility and its date

Build and run

g++ -std=c++17 -O2 src/main.cpp src/functions.cpp -o finance
./finance                      # uses data/prices.csv
./finance path/to/prices.csv   # or your own file

Input format: a header row, then Date,Close on each line.

Design

  • functions.cpp holds one function per statistic, each a single pass over the data.
  • No external libraries; standard C++17 only.

About

C++ CLI that reads daily prices from CSV and reports returns, volatility, max drawdown and rolling 20-day volatility

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages