Implementation of Online Gradient Ascent and Online Newton Step based on Logarithmic Regret Algorithms for Online Convex Optimization.
Also implemented a system to automate the process on 'real time' data from Yahoo Finance.
The system downloads data from Yahoo Finance (using yfinance) and computes what portion of the wealth to put on what stock.
Define the companies to compute the return on in run.py
and execute the file, the wealth multipliers will be logged to multipliers.log
.
The downloaded data and the parameters for the algorithms saved in /data
.
-
cvxpy
-
numpy
-
pandas
-
tqdm
-
yfinance
-
matplotlib (for ploting, not necessary otherwise)
Algorithms tested on S&P 500 dataset.
Return is in log scale so while > 0: the algorithm makes money