This course is perfect for those who have a basic understanding of cryptocurrency trading or who are already trading cryptocurrencies.
    Start for FREE:

    Timestamp:
    00:02 – 00:21 – Calender Anomalies
    00:22 – 00:48 – calendar anomalies in cryptocurrencies
    00:52 – 01:12 – What is the day of the week anomaly?
    01:13 – 01:43 – Strategy & strategy returns
    01:45 – 02:47 – Day of the week strategy

    Welcome to this video! Have you come across any calendar anomalies such as the Day of the Week Effect, the Month of the Year Effect, or the January Effect? The chances are high as there exists a vast literature about these and many more such anomalies in different asset classes and why they occur.
    However, many of them have slowly disappeared. As cryptocurrency is relatively new compared to the traditional asset classes, there is a high probability that these calendar anomalies still exist in them. Moreover, the fact that the cryptocurrencies are continuously and globally traded makes them even more interesting for calendar anomalies. Thus provides an opportunity for us to develop trading strategies to exploit them.

    In this video, let us create and backtest a trading strategy on the day of the week anomaly on the Bitcoins. It is the anomaly in which the returns or Sharpe ratio on a consistent basis is higher on a particular day compared to the other days. The Sharpe ratio by days for Bitcoin is shown here. The Sharpe ratio on Monday is significantly higher compared to the Sharpe ratio on the other days. To encash this anomaly a strategy can be created as follows: calculate the percentage change for each day. Using the data for the last 60 days, determine the Day of the Week on which the returns or the Sharpe ratio was the highest.
    For the next two weeks, buy the bitcoin on that day. Repeat step 2 and 3, for the entire backtesting period. This chart shows the returns generated by the strategy of Bitcoin.

    Let us code and backtest the Day of the Week strategy.
    The first step is to load the Bitcoin data from Mar 2014 to September 2018 from a CSV file using the pandas read_csv function. Then, calculate the percentage change on each day using pct_change function. Define a function to compute the Sharpe ratio based on the mean and standard deviation of daily returns for each of the days. Call the function for the past 60 days and determine the day with the highest Sharpe ratio using the idxmax function. For the next two weeks, set the value of the signal column to 1 for the day with the highest Sharpe ratio or to 0 otherwise. The value of 1 indicates that we are long on Bitcoin on that day. These steps are repeated for all trading days using a while loop. Then, compute the strategy returns as the signal into a daily percent change and plot the cumulative strategy returns. The strategy code is ready.

    In the upcoming units, there is an IPython notebook to implement this strategy followed by multiple-choice questions. Good luck!

    Quantra is an online education portal that specializes in Algorithmic and Quantitative trading. Quantra offers various bite-sized, self-paced and interactive courses that are perfect for busy professionals, seeking implementable knowledge in this domain.

    Find more info on –
    Like us on Facebook:
    Follow us on Twitter:

    Comments are closed.

    Share via