You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Renaissance Technologies (Jim Simons, James Ax, Elwyn Berlekamp)
Mean Reversion Model (historica on its own) + Trend Following
Kernel Methods:
Linear Regression
High-Dimensional Regression
Kelly Criterion Investment Formula
"""f fraction of assets to apply to security.p probability that investment increases in value.q probability that investment decreases in value (q=1-p).a fraction that is lost in a negative outcome. If security price falls 10%, a=0.1b fraction that is gained in a positive outcome. If security price rises 10%, b=0.1."""defkelly(p, b):
f= (p/a) - (q/b)
returnf
A* Search
Moving Averages
Simple Moving Average (SMA)
Momentum Trading or Trend following:
When moving average 50 falls below moving average of 200, sell (and short futures), otherwise, buy and go long.
month_ret=pd.DataFrame.resample('M', kind='period').last().pct_change().dropna()
foryearsin [1, 3, 5, 10, 20]:
# Anualized Mean Returns For Last ... Years.pd.DataFrame['month_ret'].rolling(years*12).mean() *12# Anualized Risk For Last ... Years.pd.DataFrame['month_ret'].rolling(years*12).std() *np.sqrt(12)
Exponential Moving Average (EMA)
reacts faster to recent price changes
Typical short term are 12 and 26 days, long term 50 and 200 days
price.ewm(span=10, min_periods=10).mean()
Double Exponential Moving Average (DEMA)
DEMA = 2*EMA - EMA(EMA)
Expanding Windows
Fixed lower bound
Mean of price up to this point in time
This discussion was converted from issue #8 on May 06, 2022 21:59.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Algorithms used in Algorithmic Trading
Renaissance Technologies (Jim Simons, James Ax, Elwyn Berlekamp)
Mean Reversion Model (historica on its own) + Trend Following
Kernel Methods:
Kelly Criterion Investment Formula
Moving Averages
Momentum Trading or Trend following:
When moving average 50 falls below moving average of 200, sell (and short futures), otherwise, buy and go long.
reacts faster to recent price changes
Typical short term are 12 and 26 days, long term 50 and 200 days
DEMA = 2*EMA - EMA(EMA)
Fixed lower bound
Mean of price up to this point in time
Rolling Correlation
Returns
Over 12 Month period
Logarithmic Returns
I.e. price is 130, 110, 120, 90, 80:
returns are -15%, 9%, -25%, -11%
mean: -12.13%
130 * np.exp(4*-0.1213) = 80
I.e. returns are respectively
30%, 10%, 20%, -10%, and -80%
The geometric average annual return == 4.3%
Equal Weighted
Other
https://en.wikipedia.org/wiki/Confidence_interval
Beta Was this translation helpful? Give feedback.
All reactions