Epoca implements a modern variation of the "Value Averaging Strategy" that operates in the Bitcoin Futures Market. It makes use of the Hedge-Mode feature and is capable of managing a long and a short position simultaneously.
The requirements for running an instance of Epoca are:
- NodeJS v16.14.0^
- Docker v24.0.6^
- 2 CPUs
- 4 GB Memory
- 50 GB Disk
Epoca manages the trading budget in an increase/decrease manner. When the price moves against a position side, it increases it. In contrast, when the price moves strongly in favor of a position, it reduces it. Additionally, the trading budget is split into 10 - 20 pieces and is used to constantly improve the entry price, regardless of the side.
To achieve this, Epoca makes use of a series of indicators built on publicly available data. The indicators used are:
- Price Window
- KeyZones (Support & Resistance Levels)
- Coins (Short-Term Price Window of the top cryptocurrencies)
- Liquidity in Bitcoin's Order Book
- Volume
- Reversal
The window module operates in a moving window of 128 15-minute-interval candlesticks (~32 hours) that is synced every ~3 seconds through Binance Spot's API.
To calculate the state of the window, a total of 8 splits are applied to the sequence of candlesticks and the state for each is derived based on the configuration.
The splits applied to the window are:
-
100%: 128 items (last ~32 hours)
-
75%: 96 items (last ~24 hours)
-
50%: 64 items (last ~16 hours)
-
25%: 32 items (last ~8 hours)
-
15%: 20 items (last ~5 hours)
-
10%: 13 items (last ~3.25 hours)
-
5%: 7 items (last ~1.75 hours)
-
2%: 3 items (last ~45 minutes)
The supported states are:
-
2: Increasing Strongly
-
1: Increasing
-
0: Sideways
-
-1: Decreasing
-
-2: Decreasing Strongly
For more information regarding this module, please visit the Core API's source code or the following notebook: Bitcoin Price State.
This module aims to identify support and resistance levels and manage the life cycle of the price contact events.
To achieve this, the Epoca performs a KeyZones Build every certain period of time and works hand in hand with the Window Module in order to generate events.
The "strength" of a KeyZone is measured by a score system that makes use of the liquidity within the KeyZone's range in real-time and the trading volume that took place when the KeyZone was first discovered.
When the price increases or decreases significantly and hits one of these levels, a KeyZone Event is created and remains active for a period of time.
For more information regarding this module, please visit the Core API's source code or the following notebook: Bitcoin KeyZones (Support & Resistance Levels).
This module aims to have a deep understanding of the short-term price direction for the top cryptocurrencies.
Epoca establishes a WebSocket Connection to the "Mark Price" for all the installed cryptocurrencies and calculates their state on a real time basis for both rates, BTC and USDT.
The state is calculated the same way as it is for the Window Module.
The state of the coins is analyzed as a group and individually:
Epoca automatically extracts all the supported coins from the exchange and scores them based on several factors. Such as: daily volume, maximum supported leverage, etc. It also supports the installation of any number of coins into the system.
This module aims to identify when an abnormal amount of buying/selling liquidity has been placed in Bitcoin's Order Book.
To achieve this, Epoca establishes a WebSocket Connection to the "Order Book" and processes the raw data on a real time basis. During this process, the system identifies "Liquidity Peaks" and groups them based on their intensity.
Having identified all the peaks within the price range, the "Bid Liquidity Power" is calculated, whose only purpose is to indicate when there is an abnormal amount of buy or sell liquidity in the Order Book.
This module aims to have a deep understanding of the Bitcoin Spot Market's trading volume to identify times at which there is significant participation.
To achieve this, the system establishes a real time connection with ~32 hours (same lookback as the window) worth of 1m candlesticks and calculates the volume state requirements (The amount of traded USDT required for it to mean that the volume is high).
The system evaluates the current volume against the requirements on a real time basis and broadcasts the state. The volume can have the following states:
-
0: Ultra Low
-
1: Low
-
2: Medium
-
3: High
Note that when a state greater than 0 is identified, it remains active for ~3 minutes. If the "high" volume is not sustained, it goes back to 0 after this period.
This module aims to identify when a KeyZone Contact Event (Support or Resistance) has the potential to cause a price reversal.
Whenever a KeyZone Event (support or resistance) comes into existence, the Reversal Module is activated and starts tracking the behavior of the market.
SUPPORT CONTACT: the Reversal Module analyzes Epoca's indicators to determine if there is enough buying power for the price to reverse (increase).
RESISTANCE CONTACT: the Reversal Module analyzes Epoca's indicators to determine if there is enough selling power for the price to reverse (decrease).
Each indicator has a weight and when the required points are reached, a reversal event is issued.
As described above, Epoca increases and decreases position sizes based on the state of the market. If the price moves against a position and the requirements are met, the position is increased. On the other hand, if the price moves in favor, the position is reduced.
The image below shows a long position that was initially opened on the 14th of July 2023 and was closed (reduced to $0) on the 1st of October 2023. During this period, the position was increased ~10 times and experienced ~29 reductions. The reductions are represented by the black dots in the Gain% chart:
The image below shows a short position that was opened on the 14th of July 2023 and was closed on the 20th of July 2023. During this period, the position was increased ~3 times and experienced ~9 reductions:
Epoca provides an advanced interface to visualize the performance yielded for any period of time. It also allows you to keep a close eye on the fees charged by the exchange real time.
Even though the configuration that comes out-of-the-box has been tested for over a year, every module can be deeply fine-tuned to adapt to any trading strategy.
In order to provide a high quality input to each of the modules, Epoca stores and permanently syncs the historical prices of Bitcoin in candlestick format (1 minute intervals). This allows the system to build and output datasets in any desired format (defaults to .csv) and time interval, so they can be used by any system external to Epoca (E.g. Jupyter Notebooks).
Epoca is a complete technological infrastructure that handles security, authentication, trading, server and database management so trading can be performed without any interruptions.
The hardware that runs the platform is constantly monitored and admins are notified if any irregularity or high temperature is detected.
The database is backed up on a daily basis, a copy is kept locally, and another one is uploaded to the cloud and can be easily restored in case of a system failure or natural disaster.