Endogenous vs exogenous models
Endogenous: Historical share price and trading volume Exogenous: fundamental data on performance and competitiveness
TODO: refine
Buyside = companies that buy/invest in stocks etc. Eg hedge funds. Sellside = market makers, provide advisory eg. investment banks
a. hedge funds: generate +ve returns independ of overall moves in the market = alpha
b. portfolio managers also measure outperformance as compared to a benchmark.
a is different from b
b comes from long asset holdings exposed to market or company risks. a attempts to hedge or minimise these risks.
frequent transactions vs portfolio rebalancing
portfolio rebalancing: give more weight to undervaluued assets used by portfolio managers. Use fundamental analysis
short term vs long term: traders are much short term. They ignore fundamental analysis
buy side quant methods vs sell side quant methods
Complex trading strategies: Quantitative Trading (Accounts for 90% of trading volume!) Algorithmic Trading (70% of US trading volume) High Frequency Trading (Subset of algo trading. ms or us timescale.)
data + complex straging strategies = alpha
cointegration: difference between means of two series is stationary correlation does not imply cointegration
momentum stock tends to be riskier. beta?
high frequency trading exploits millisecond and sub millisecond market microstructure inefficiences.
when a fund wants to purchase a large quantity of a stock, it tries to hide the order by breaking it up so that it doesnt reveal its plan to the competitors
Exchange arbitrage: riskless, pure
bid price usually < ask price bid price: price an investor can sell the security at. ask price: price an investor can buy the security at. bid and ask can be thought to be from the bank's pov. Bank bids for shares and bank asks for a price for the share. thus buying at ask price and selling at bid price will normally incur a loss equal to the bid ask spread.
If the situation is reversed and ask price < bid price. A riskless profit can be made. Can happen with an instrument listed on 2 indices Eg. ask price on nyse is 100 and bid price on nasdaq is 100.10.
Carry arbtirage: TODO
Statistical arbitrage: mean reversion. ie Things regress to their mean generally eg. mean 100 +- 5% Buy when 95 sell when 105
Pairs Trading: choose 2 stock trading on the same exchange. Go long on one and short the other.aka trading a spread
Challenges in statistical arbitrage: paying for liquidity (?) short sale charges trading, clearing and exchange fees risk based charges (?)
Index arbitrage: high frequency trading sell etf and buy component stocks or vice versa
Backtesting Validation backtest: simulation to measure the performance and risk applied to historical data. allows for comparison of strats informs about capital required, risk, frequency etc.
paper trade strategy => simulation of real world data.
Backtesting objectives: consider a set of strategies for testing and filter out strats that dont perform. can optimise strat by tweaking parameters.
Sharpe ratio = return/risk Calmar ratio = return/max drawdown (?)
Backtesting gotchas:
Backtesting Biases:
development backtesters vs implementation backtesters
Forecasting = Predicting the future (based on past and present data)
note: BigQueryML by Google simplifies ML modelling
Series of data points indexed in time order
Stationary Time Series => Statistics of series is independent of time. ie mean and sd dont depend on time.
Non stationary data has "trends"
(?) Augmented Dicky Fuller Test tests for stationarity
Time series components:
(?) Why stationarity?
Stock prices are typically not stationary
TODO: Details about time series
Autocorrelation: A correlation of a variable with itself at different periods
Use data from previous timepoitns to predict at later timepoints
Take previous error terms as input instead. in the past.
AR Integrated Moving Average ARIMA(p,d,q)
Time series of past observations instead of independent features for predictions
ARIMA VS regression
...
? Plotting residuals ? Ljung-box test