All Projects → brookswoolf → Trading-Algorithms

brookswoolf / Trading-Algorithms

Licence: other
This repository contains the customized trading algorithms that I have created using the Quantopian IDE.

Programming Languages

Jupyter Notebook
11667 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Trading-Algorithms

Elitequant
A list of online resources for quantitative modeling, trading, portfolio management
Stars: ✭ 1,823 (+2019.77%)
Mutual labels:  quantitative-finance, quantitative-trading, portfolio-management
Mlfinlab
MlFinLab helps portfolio managers and traders who want to leverage the power of machine learning by providing reproducible, interpretable, and easy to use tools.
Stars: ✭ 2,676 (+3011.63%)
Mutual labels:  portfolio-optimization, quantitative-finance, portfolio-management
Pyportfolioopt
Financial portfolio optimisation in python, including classical efficient frontier, Black-Litterman, Hierarchical Risk Parity
Stars: ✭ 2,502 (+2809.3%)
Mutual labels:  portfolio-optimization, quantitative-finance, portfolio-management
portfoliolab
PortfolioLab is a python library that enables traders to take advantage of the latest portfolio optimisation algorithms used by professionals in the industry.
Stars: ✭ 104 (+20.93%)
Mutual labels:  portfolio-optimization, quantitative-finance, portfolio-management
QuantResearch
Quantitative analysis, strategies and backtests
Stars: ✭ 1,013 (+1077.91%)
Mutual labels:  quantitative-finance, quantitative-trading, portfolio-management
fin
finance
Stars: ✭ 38 (-55.81%)
Mutual labels:  quantopian, portfolio-optimization
Strategems.jl
Quantitative systematic trading strategy development and backtesting in Julia
Stars: ✭ 106 (+23.26%)
Mutual labels:  quantitative-finance, quantitative-trading
Bulbea
🐗 🐻 Deep Learning based Python Library for Stock Market Prediction and Modelling
Stars: ✭ 1,585 (+1743.02%)
Mutual labels:  quantitative-finance, quantitative-trading
Quant Trading
Python quantitative trading strategies including VIX Calculator, Pattern Recognition, Commodity Trading Advisor, Monte Carlo, Options Straddle, Shooting Star, London Breakout, Heikin-Ashi, Pair Trading, RSI, Bollinger Bands, Parabolic SAR, Dual Thrust, Awesome, MACD
Stars: ✭ 2,407 (+2698.84%)
Mutual labels:  quantitative-finance, quantitative-trading
Quant
Codera Quant is a Java framework for algorithmic trading strategies development, execution and backtesting via Interactive Brokers TWS API or other brokers API
Stars: ✭ 104 (+20.93%)
Mutual labels:  quantitative-finance, quantitative-trading
Tradingstrategies
Algorithmic trading strategies
Stars: ✭ 120 (+39.53%)
Mutual labels:  quantitative-finance, quantitative-trading
Py Quantmod
Powerful financial charting library based on R's Quantmod | http://py-quantmod.readthedocs.io/en/latest/
Stars: ✭ 155 (+80.23%)
Mutual labels:  quantitative-finance, quantitative-trading
Zvt
modular quant framework.
Stars: ✭ 1,801 (+1994.19%)
Mutual labels:  quantitative-finance, quantitative-trading
Trading Backtest
A stock backtesting engine written in modern Java. And a pairs trading (cointegration) strategy implementation using a bayesian kalman filter model
Stars: ✭ 247 (+187.21%)
Mutual labels:  quantitative-finance, quantitative-trading
TAA-PG
Usage of policy gradient reinforcement learning to solve portfolio optimization problems (Tactical Asset Allocation).
Stars: ✭ 26 (-69.77%)
Mutual labels:  portfolio-optimization, portfolio-management
Turingtrader
The Open-Source Backtesting Engine/ Market Simulator by Bertram Solutions.
Stars: ✭ 132 (+53.49%)
Mutual labels:  quantitative-finance, quantitative-trading
okama
Investment portfolio and stocks analyzing tools for Python with free historical data
Stars: ✭ 87 (+1.16%)
Mutual labels:  portfolio-optimization, quantitative-finance
Gdax Orderbook Ml
Application of machine learning to the Coinbase (GDAX) orderbook
Stars: ✭ 60 (-30.23%)
Mutual labels:  quantitative-finance, quantitative-trading
Ft
算法交易系统,支持CTP、XTP、模拟交易及行情网关、回测。不断迭代更新中。
Stars: ✭ 100 (+16.28%)
Mutual labels:  quantitative-finance, quantitative-trading
Quant Notes
Quantitative Interview Preparation Guide, updated version here ==>
Stars: ✭ 180 (+109.3%)
Mutual labels:  quantitative-finance, quantitative-trading

Trading Algorithms

This repository contains the customized trading algorithms that I have created using the Quantopian IDE:

Go to Quantopian and copy/paste any of the algorithms to test!

Enjoy! ^_^

backtest1

The Multi-Factor Model

This is the project that I dedicated myself to creating once I learned how to use Python to implement a trading model based on traditional financial theories. Factor investing is the idea of creating a portfolio that is weighted based on favorable factors such as quality, growth, value, momentum, and size (to name a few). A lot of research has been done and published regarding the concept of factor investing, so I thought to use my skills to develop a model that can be easily implemented and altered. When creating anything like this, I am sure to make it not only very user accessible, but also organized and visually aesthetic. As a note, the driving factor and strategy of this algorithm was researched before being backtested in the IDE. This algorithm was heavily influenced by my research in the below notebook:

"Quality Score - Extracting 'Quality' From Your Pipeline"

This notebook is the first part of the main project that I developed using concepts I learned from my education and reading numerous whitepapers in my profession. This notebook tries to recreate the 'quality score', which over the past 15 years has shown to be the driving return factor across multiple different benchmarks. A company is considered 'quality' when they have a combination of an ethical and forward-thinking management, solid financials (i.e. profitable, low debt, consistent cash flow), and good market positioning. That can be hard to define and the market is always changing so I wanted to make something that can be fully customized and educational.

The Constrained Model

This is an algorithm that I created using the defined contest criteria for Quantopian. This algorithm has more adjustable constraint and optimization settings compared to the Multi-Factor Model simply because it is focused on those objectives. The Multi-Factor Model is better for backtesting different alpha factor theories using different combinations of factors. The tested alpha factor from the Multi-Factor Model can be easily plugged into this model and tested using the costrained criteria. This model can also be seen as a conservative approach to reviewing the actual strength of your alpha factor in a real world setting. The alpha factor was initially researched in the below notebook:

"Alpha Analysis"

This notebook was initially made to test different fundamental alpha theories. I wanted to make a notebook that was concise, but also very informational. You can come up with any combination of different fundamental values, ratios, and any other Morningstar data you like. This book uses tear sheets to analyze the effect of the factors and returns across different sectors and portfolios. When analyzing the predictive value of an alpha factor, it is common to look at the mean information coefficient. The information coefficient essentially represents the correlation between the predicted values of a stock and the actual outcome. At the bottom, you can also visualize the 'decay' of your alpha factor across the data set by plotting the mean information coefficient.

The Futures Breakout Trading Model

This trading model was inspired by a book about the teachings of Richard Dennis and his trading partner Bill Eckhardt during the Turtle Experiment in 1983. The model trades ten different futures markets in an attempt to capture channel breakout patterns. In the experiment, they took 14 traders and taught them a complete rule-based trading system for determining markets, position sizing, entries, stops, exits, and a handful of miscellaneous (and useful) trading tactics that can be used to leverage different market nuances. Over the course of five years of trading, the Turtle group had reportedly earned more than $175 million. Click here for the complete book.

The Random Forest Regression Model

This was something that I wanted to develop in order to better understand the application of machine learning in a quantitative finance. Although basic in its actual application, I feel like this helped me understand the actual objective that machine learning models try to accomplish. The idea of implementing trading strategies based on machine learning has been growing with popularity, however perfecting a model that relies heavily on a machine learned alpha vector is still very difficult even amongst seasoned professionals. That being said, I feel that this is the direction that we are headed, and in the near future this type of model is going to be implemented across all firms in the industry, some way or another.

Pairs Trading Model (US Equities)

This model serves as a framework to trade multiple pairs of cointegrated equities. Before plugging a pair into the backtesting environment, a recent time series of the relative returns should be tested for stationarity and normality, while their linear combination is ultimately tested for cointegration using a statsmodels cointegration test. After passing all of the tests in the research environment, the pair can be plugged into the trading model. A zscore is derived using the mean 21-day price spread between the pairs, it's standard deviation, and the current price spread between the pairs to be used for the trading logic. In its current state, the model is purely a framework for backtesting new research.

Monthly Momentum Model

I developed this model in response to an inquiry on the Quantopian forums. A user was inquiring how to incorporate a double sort technique to rank and order stocks in the pipeline based on monthly returns. The positive (negative) sign of cumulative monthly returns is used as a pre-filter for the long (short) baskets. Stocks are continuously ranked based on 21-day returns (average amount of trading days per month). Stocks in the long basket with the highest 21-day returns are bought long, and stocks in the short basket with the lowest 21-day returns are sold short. The portfolio is set up to be dollar neutral and rebalances once a month. The links to the posts are here and here.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].