FAQ#
Here, we answer common questions about our project, usage, and best practices.
Is there any platform given by Zelta to submit alpha?#
Yes, there is a platform provided by Zelta called Jupyter_untrade for testing, developing, refining, and pushing code.
Platform link: Jupyter Untrade
Vector link: Vector
What are the suggested approaches for strategy development?#
Participants are encouraged to explore statistical analysis and various mathematical approaches to create alpha-producing strategies, balancing computational efficiency with maximized returns.
Some approaches in Algorithmic Trading that can be employed for this program:
Machine learning models like regression models, decision trees, random forests, support vector machines etc.
Deep learning models, such as recurrent neural networks and convolutional neural networks etc.
Reinforcement learning techniques, such as Q-learning or deep reinforcement learning etc.
Technical analysis i.e statistical approaches using various indicators or combinations of indicators to generate noise free signals etc.
Various miscellaneous approaches like bagging and boosting for accurate prediction, monte carlo methods or stochastic models like Markov chains etc.
What are the position sizing approaches to be considered for trades?#
You can use two approaches:-
Using 1000 dollars in every trade. (static)
Opening the first trade with 1000 dollars and then adjusting the profit/loss of that trade in 1000 dollars. Whatever balance is left after adjustment , next trade will be executed with that total balance. It goes on arithmetically like this. (compounding).
Why do we prefer statistical approaches rather than ML-centric approaches ?#
We’ve noticed some common concerns in all ML models, such as challenges in generalizing capabilities on unseen data, suboptimal performance on hidden data patches, failing of execution in live trading environments due to non-explainability of models. We acknowledge the importance of periodic retraining for ML models to enhance generalization capabilities.
Understanding why a model produces specific signals and its behavior is crucial for effective strategy development- Explainable AI/XML here plays a crucial role in addressing the challenges thrown by black box.
Can we get formulas for calculating PnL and other important metrics?#
Formulas are widely available on the internet. We have provided formulas for calculating PnLs of all logs and then eventually arriving at a cumulative PnL. Additionally, you can use our library, which has a backtesting engine integrated into it for quick self-assessment of metrics in your approaches.
Once it is generating alpha consistently quarterly/semi-annually/yearly and on a complete bitcoin cycle of 4 years , we can go ahead with monitoring_frontrun for 3 weeks followed by official start of Day 1_Create/Earn.
What are valid signal values?#
Valid signal values are: - 1: Buy - -1: sell - 1,-1: Close - 2: Reverse Short - -2: Reverse Long - 0: Hold
What’s the difference between static and compounding position sizing?#
Regarding position sizing: Participants should not be worried about position sizes at first instance. A major part of your initial time should go into strategically building a logic to go ahead.
Static approach: - Every trade uses exactly $1,000, regardless of previous trade outcomes - Simpler to implement and analyze - More conservative approach
Compounding approach: - Trade size changes based on cumulative profit/loss - Example:
First trade: Opens with $1,000
Makes $200 profit → Account now $1,200
Second trade: Opens with $1,200
Takes $300 loss → Account now $900
Third trade: Opens with $900
This method allows trading capital to grow or shrink arithmetically with each trade’s outcome
Same strategy will give different analytics when run through static and compounding models
Participants can test both approaches to compare results
How does commission accounting work in the sdk library ?#
For every trade (both long and square off or short and square off included), the fee is 0.15% irrespective of the Profit/loss booked in that trade.
For every trade - you are shelling out 1.5$ dollar (0.15% of 1000 dollars in static approach)
- Example calculation:
If you have 2000 trades = 2000 * 1.5$ = 3000$ (final outgoing charges including commission + slippages)
Final profit calculation: Gross profit - commissions = Net profit
How does the limit backtest engine work?#
- The limit engine requires two columns: SL (Stop Loss) and TP (Target Price)
SL column contains stop loss prices
TP column contains target prices
- Trade Initiation:
When opening a trade (e.g., long position with signal 1), you must set TP and SL as percentages of the closing price
Similar process applies for short trades (signal -1)
- Trade Monitoring:
Engine monitors subsequent highs and lows starting from the next candle
If either TP or SL is hit, the trade closes at that timestamp
- Signal Management:
- If neither TP nor SL is hit and a new signal occurs:
Previous signal’s trade will close
New signal initiates a trade with new TP and SL values
- Example: If you have an open long trade (1) and a new long signal (1) appears before TP/SL hit:
Previous long position closes
New long position opens with fresh TP/SL levels
How do I mark signals for trade chaining?#
- For chaining trades (immediately opening a new position after closing), use signals 2 and -2:
2: Square off previous trade and open a long position
-2: Square off previous trade and open a short position
- Example scenario:
If you have an open long position (marked with 1)
And want to close it and immediately open a short position
Use signal -2 to accomplish both actions in one step
- You can mix chaining signals (2, -2) with regular signals (1, -1) in the same strategy
Regular signals: 1 (long), -1 (short)
Chaining signals: 2 (reverse to long), -2 (reverse to short)
How does TSL (Trailing Stop Loss) functionality work?#
- TSL Setup:
When opening a trade (long: 1 or short: -1), a TSL value is set
TSL values can be dynamically updated during the trade
- TSL Monitoring:
Engine checks if the next high/low price reaches the TSL value
- Two possible outcomes:
If TSL value is within high/low range: Trade exits
If TSL value is outside high/low range: TSL updates to next user-provided value
- Signal Management:
- If TSL not reached and new signal appears:
Previous trade closes
New trade opens at same timestamp
- Example Scenario:
Open long position with TSL value
TSL not hit, new short signal appears
Long position closes
New short position opens at same timestamp
How do I ensure my strategy doesn’t have look-ahead bias?#
There’s a simple way to check for forward-looking bias in your strategy:
Testing Process: - Step 1: Generate signals for full dataset
Example: Generate CSV with signals from 2020-01-01 to 2022-12-31
Let’s say this produces 150 signals
- Step 2: Select test point
Pick a random signal timestamp (e.g., 2021-01-01 01:00:00)
Create truncated dataset up to this timestamp
- Step 3: Comparison test
Run strategy on truncated dataset
- Compare signal and indicator values at test timestamp between:
Original full dataset results
Truncated dataset results
If values match and no signals are missing, strategy is free from look-ahead bias
If values differ or signals are missing, strategy may have look-ahead bias
Could you provide an example of a successful in-house strategy?#
- One of our strategies, called Omega, demonstrates consistent profitability:
Built on Hawkes Process mathematical foundation
Operates on 1-hour timeframe
Manages drawdowns effectively in non-trending markets
Good time-to-recovery rate
Strong risk-reward ratio between average wins and losses
Annual returns exceeding 150% with less than 30% drawdowns (compounding)
Performance Analysis (16 quarters from Jan 2020 to Jan 2024): - Quarterly Success Rate:
Profitable in 15 out of 16 quarters
Only 1 quarter showing loss
Outperformed BTC buy-and-hold benchmark in 12 out of 16 quarters
- Consistency:
Maintains ~60% win rate across quarters
Effectively manages risk in various market conditions
Could you please elaborate on how benchmark returns are calculated and why it is an important metric for us?#
Benchmark returns are calculated by buying BTC on the first day of the year and holding it until the last day of the year. This simple buy-and-hold strategy serves as a baseline comparison for evaluating the performance of trading strategies over the same time frame.
- Trading strategies should aim to outperform benchmark returns for several key reasons:
Value Addition: A successful strategy that consistently beats the benchmark demonstrates real value to investors
Opportunity Cost: If a strategy can’t beat the benchmark, investors might be better off with a simple buy-and-hold approach
Credibility and Trust: Strategies that consistently deliver alpha (excess returns over benchmark) build investor confidence
This comparison helps evaluate the performance of the trading strategy and strategies should try to universally outperform benchmarks irrespective of time periods and sentiments in markets.
Could you provide an example of benchmark comparison using actual performance data?#
Consider the Omega strategy’s performance in Q4 2023 (October 1, 2023 to January 1, 2024):
- Performance Metrics:
Bitcoin Benchmark Return: 57.56%
Omega Strategy Return: 83.48%
Alpha Generated: 25.92%
- Alpha Calculation:
Alpha = Strategy Return - Benchmark Return
Alpha = 83.48% - 57.56% = 25.92%
This real-world example demonstrates how the Omega strategy significantly outperformed the Bitcoin benchmark during this period, generating substantial alpha for investors. Such consistent outperformance validates the strategy’s effectiveness in various market conditions.