CodingTest.
md 2023-11-07
Coding Test
Please complete the task in jupyter notebook (ipynb) & submit the required charts as png
with the jupyter notebook together inside a zip file.
Question 1
Kimchi Momentum Strategy Backtesting
. When Bitcoin goes up X% on Upbit Exchange , Long Bitcoin in Binance ; when Bitcoin
goes down Y% on UpBit exchange , Short Bitcoin in Binance.
. You need to collect price of Bitcoin Perpetual Futures from UpBit & Binance respectively.
. Divide the whole data period into 2 parts. 50% of the time for backtest another 50% for
forward test. For example, you have data from 01/2021 to 01/2023. Then 01/2021 to
01/2022 is used for backtest. 01/2022 to 01/2023 is used for forward test.
. Generate a sharpe heat map to loop and find the best X & Y combination. (like image
below)
. Calculate CAGR , Maximum Drawdown and Sharpe Ratio
Question 2
Alpha Factors Backtesting
. Download the hourly price data (i.e. Candlestick data) of BTCUSDT linear perpetual
swaps from Binance or Bybit since 2021 Jan til the latest data source you can get.
Clean the data.
1/3
CodingTest.md 2023-11-07
. Create & define columns (alphas) by following the below formulas; Remark: Please
handle some marginal cases when denominator equals 0, can just assuming an
insignificant value to the formula,
2/3
CodingTest.md 2023-11-07
for example on 'alpha_C', define denominator as max(high - low, 0.0001)
'alpha_A': √ high low - VWAP, where VWAP = (Cumulative Typical Price *
Volume) / Cumulative Volume & Cumulative Typical Price = (close + high + low)
/ 3; you can take the rolling 24h data to compute VWAP.
'alpha_B': −1 ((low − close) (open)5)/((low − high) (close)5)
'alpha_C': (close − open)/((high − low) + .001
. After computing the 3 'alphas', you can design any approaches for on these 'alphas'
(can be of different approaches on each 'alphas' or same approach on different
'alphas', can simple as if alpha_X is bigger than zero, long; vice versa, or do another
layer of data transformation to signal). You can combine the performance of strategies
built on different alphas. Compute the backtest result (sharpe ratio, return/CAGR,
maximum drawdown, calmar ratio, with a plot of performance curve).
Question 3 (Bonus)
Bonus Strategies Brainstorm Backtesting
Come up with a trading strategy of BTC or ETH (CTA appraoch). Extra points if
alternative data are used (such as Coinglass, or other available websites) for
constructing the strategy. Compute the backtest result (sharpe ratio, return/CAGR,
maximum drawdown, calmar ratio, with a plot of performance curve). Tell us if the
result matches your expectation. We focus more on the process of from construction to
optimization of the strategies without overfitting & ideas behind than the result of
backtest.
3/3