Skip to content

Implementation and tests of MAMR and PAMR active portfolio management for binance cryptocurrency assets.

License

Notifications You must be signed in to change notification settings

alfredholmes/Crypocurrency-Portfolio-Management

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MAMR, OLMAR, and PAMR simulations for binance exchange

Implementation of PAMR and MAMR portfolio management algorithms for online portfolio management and analysis of cryptocurrency assets.

MAMR and PAMR Simulations

The scripts MAMR.py and PAMR.py simulate the returns that the portfolio selection algorithms would have achived had the algorithm been running. We see that MAMR outperforms PAMR in general, although parameter fitting has only been done by eye - no system has been implemented (yet). The MAMR implementation differes slightly from the paper by using a different moving average for the return prediction which empirically enjoys better results.

MAMR 12 hour - 0.1% Trading Fee

MAMR 12 hour

Example Portfolio Through Time

Portfolio through time

PAMR 30 minute Performance - with the trading fee of 0.1%

Parameters fitted to maximise the mean daily return, algorithm runs every 30 minutes PAMR-2 Performance

Requirements

pip3 install requests numpy scipy  

To run PAMR/MAMR simulations

git clone https://github.com/alfredholmes/Binance-Portfolio-Management.git
cd Binance-Portfolio-Management
python3 data/get_candles_spot.py 
python3 PAMR.py
python3 MAMR.py

In general MAMR outperforms PAMR for cryptocurrency portfolios.

References / useful papers

Passive aggressive mean reversion

Li, B., Zhao, P., Hoi, S.C.H. et al. PAMR: Passive aggressive mean reversion strategy for portfolio selection. Mach Learn 87, 221–258 (2012). https://doi.org/10.1007/s10994-012-5281-z https://link.springer.com/content/pdf/10.1007/s10994-012-5281-z.pdf

Multiperiodical Asymmetric Mean Reversion

Peng, Zijin & Xu, Weijun & Li, Hongyi. (2020). A Novel Online Portfolio Selection Strategy with Multiperiodical Asymmetric Mean Reversion. Discrete Dynamics in Nature and Society. 2020. 1-13. 10.1155/2020/5956146. http://downloads.hindawi.com/journals/ddns/2020/5956146.pdf

About

Implementation and tests of MAMR and PAMR active portfolio management for binance cryptocurrency assets.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages