Please enable JavaScript.
Coggle requires JavaScript to display documents.
Arbitrage Augmented Intelligence Dashboard (Garch Volatility Forecasting…
Arbitrage Augmented Intelligence Dashboard
Garch Volatility Forecasting
Generalized Autoregressive Conditional Heteroskedasticity model is a statistical model for time series data projecting volatility in future periods
Application: Forecasting time dependent volatility for cryptocurrency transfer time
t
example:based upon litecoin's current mempool, transfer time is projedted to be
t
minutes
from there Vol_
t
is determined
EWMA and Garch(1,1) Calculation:
Compute period lognormal return
ln(t1/t0)
square return
u^2 = ln(t1/t0)^2
3a. EWMA Var = lambda
EWMA_Var(t-1) + (1 - lambda)
*u_t^2
3b. GARCH Var = Omega + (Beta
Garch_var(t-1)) + (alpha
u_t^2 )
Vl = omega/ (1-beta - alpha)
note: for GARCH parameter fitting, use maximum likelihood estimate (MLE)
qualitatively, Vl = long run average variance of the time series
Beta = weighting of lagged (1,1) previous calculation
Alpha = weight of previous realized return
Vol = Var ^.5
Data sourcing:
API minute data for Garch's of Exchange A price, Exchange B price, and ln(A_ask / B_bid)
mempool data (blockchain.info or etherscan) + exchange specific latency =
t
(use Jake's exchange latency pinging system to determine those constants)
example: based upon litecoin's current blockchain mempool size and Bithumb latency, the transfer time is projected to be
t
minutes
from there a GARCH Vol_t is calculated
Logic:
if spread >
t
* Vol_estimate
execute trade
Multi-Factor Spread Predictive Model
Autoregressive linear regression
Factors:
Price Volatility Exchange A
Price Volatility Exchange B
Fiat Exchange Rate
24hr Volume Exchange A
24hr Volume Exchange B
Time of Day
As well as including lagged factors for AR components
Application:
Spread Prediction
Directional Momentum
Utilize TWAP momentum signals
Application:
Increase likelihood of market moving in favorable direction during transfer period
Logic:
Execute arbitrage trades when momentum signal is directionally favorable (bullish)
convert cryptocurrency into fiat when market direction is unfavorable (bearish)
Data:
Blockpoint momentum vortex strategy
Statistical Reversion Likelihood
Assumptions:
The time series of a same product listed on different exchanges will be both cointegrated and correlated as a pair
Application:
Mean Reversion Modeling of Spread Size
Determine optimal times to enter a longspread
Calculations:
Spread_Z
Calculate arithmetic mean over
n
periods
Compute variance = (sum[(value_i - mean)^2])/ (
n
-1)
Compute Standard deviation = variance^ .5
z = X - u/o
ADF
Augmented Dickey-Fuller test p-value
unit root test for monitoring how cointegrated the spread currently is
(think of the drunken man walking his dog, p-value is equivalent to leash strength)
*me and mo have already programmed the model for this
Logic:
establish z-score thresholds (i.e -3 and 3)
enter spread long when z < -3
close reversion when z > 3
If multiple opportunities are present for arbitrage, we will select the pair with the lowest ADF p-value
Wilder's Average True Range
Calculations:
TR = max[(high - low), abs(high - close_prev), abs(low - close_prev)]
ATR = (ATR_t-1 * (n -1) + Tr_t) / n
or
ATR = (Previous_ATR * (n-1) + TR) / n
Application:
Assists qualitative evaluations of the spread's range.
Will provide us with a target profit metric per trade and act as an exit condition when acting "greedy" or overtrading
Logic:
If spread moves directionally favorable by a value = ATR,
execute close of trade
Excess return of strategy > ATR is not likely
Ornstein-Uhlenbeck Spread Reversion Half-life
Application:
Determines optimal holding period for a mean-reverting position and used as a measure for exit-trading strategy
Theoretical computed time that it will take for a spread to mean revert half of its distance to the mean from the current divergence point
For portfolio dynamics it will help estimate how long our money will be overseas and act accordingly
Evaluating the timed opportunity cost of acting on a spread opposed to trading another strategy
Calculations:
ornstein-uhlenbeck process is a mean reverting process described by
dXt = a (u - Xt)dt + o dWt
a
= half life
u
= mean
o
= standard deviation
dt = respect to time
Wt = one dimensional Brownian Motion Weiner process
a
= - log(2) / log(r1)
r1 = reversion speed of the time series
where r1 is autocorrelation of y1 at lag 1.
r1 = corr(yt, yt-1)
or by regressing:
y(t) − y(t − 1) against y(t − 1) and using the beta coefficient
Hurst Exponent
Application:
Returns a value between 0 and 1 and determines whether a time series is currently trending directionally or mean reversing
Hurst Exponent assumes long-term memory and fractality. If the kimchi premium has self memory due to some market participants acting in result of arbitrage spread, the Hurst Exponent will signal when we should be greedy and let a spread increase favorably, or when we should take profits
Calculation:
E[R(n)/S(n)] = Cn^H as n approaches infinity
R(n) = range of values over n periods
S(n) = standard deviation over n periods
E[x] = expected value
n = number of data points in time series
C = constant
H = asymptotic behavior of the rescaled range
Logic:
The closer the H value is to 0, the spread is more likely to be in a mean reverting regime,
if the value is closer to 1 it is under a trending regime
Values near .5 are in a noisy state
If Hurst value is near .5 we generally want to avoid trading the spread
If Hurst value is near 0 we want our funds on Exchange B
If Hurst Value is near 1 we want funds on Exchange A
Suggested Kelly Criterion Position Sizing
Application:
Mathematically determine optimal portfolio allocation to commit per given trade opportunity
Eventually be applied for a perpetual net spread trade when we run into capital scalability concerns
Calculation:
K = w-[(1-w) / r]
or
K = E/O
where Kelly ration will be a function of:
E = (Current_spread - periodic_mean spread)
e^(-risk_free_rate
half_life )
O = 1 - Z_score_pdf
Logic:
When an opportunity becomes present, dedicate our total portfolio value * K to determine how much to enter the long spread position with
Logic:
If E[r] of alternative strategy over period_length = spread half life < (Current_spread - spread_mean)
then funds should be allocated to spread arbitrage instead of the alternative strategy
Logic:
If spread is predicted to decrease by significant amount send from Exchange A to Exchange B
if spread is predicted to increase by a significant amount send funds from Exchange B to A
Can be utilized for both spread reversion arbitrage as well as instantaneous net trading
Use the aggregate set of quantitative tools to optimally trade arbitrage with the highest E[r]
Increase scalability and profitability of our portfolio's unique strategy