Trading Strategy Examples: Equal-Weight Portfolios, Arbitrage, and Market Making
Summary
This recap presents four trading scripts developed by participants in an educational program. The examples include a portfolio that rebalances equally across assets, spot–perpetual arbitrage that opens positions when the price spread exceeds a threshold and closes them as it narrows, a market-making strategy that can be roughly backtested with historical OHLCV data, and a fast price-following approach called the Leeks Reaper strategy.
The article explains the basic rationale and operating conditions for each example, rather than providing a systematic performance comparison. It notes that the arbitrage script was revised to address redundant trades and that historical-data backtests offer only a rough assessment of market making. The Leeks Reaper approach was popular when trading fees were low, but the recap says its effectiveness declined as fees increased. No detailed results, risk-adjusted metrics, or controlled tests are provided, so the examples are best read as strategy sketches rather than evidence of profitability.
Key ideas
- An equal-weight portfolio allocates the same share of its assets to each included asset and rebalances over time.
- Spot–perpetual arbitrage uses spread thresholds to enter and exit positions across spot and derivative markets.
- Historical OHLCV data can support a rough backtest of market-making behavior.
- The Leeks Reaper strategy follows short-term price movements, and its high trading frequency can make fees a major constraint.
Tags
Full text
# Botcamp Cohort #4 Demo Day Recap --- date: 2023-05-25 authors: - mike categories: - Botcamp --- # Botcamp Cohort #4 Demo Day Recap  We recently finished our **fourth cohort** of [Hummingbot Botcamp](https://www.botcamp.xyz) with Demo Day, where participants showcased the custom trading scripts they developed over the course of the Botcamp intensive 6-week online core course! The Botcamp participants in this cohort were a dynamic mix of enthusiastic software developers, enterprising startup founders, and adept quant traders, all keen on honing their own unique trading strategies and skills. Botcamp is a professional community with regular events, and numerous participants have forged strong bonds well beyond the program's duration. Let's take a look at what Botcamp participants presented for Demo Day #4! ### **Index Portfolio (Roland)**  Roland wrote a script that creates a self-rebalancing portfolio based on a 1/N strategy, ensuring ideal diversification without the need for specific parameters, thus offering a satisfactory baseline performance. Specifically, the strategy allocates equally across N different assets. This approach promotes a broad diversification that can effectively mitigate risks associated with individual investments. By adopting this straightforward strategy, investors can sidestep the often complex task of predicting future asset performance or understanding intricate asset correlations. Moreover, it provides a reasonable baseline performance, making it an excellent choice for those new to investing or for those preferring simplicity over more complex, possibly riskier strategies. Explore and use the script: [https://github.com/hummingbot/hummingbot/blob/master/scripts/1overN_portfolio.py](https://github.com/hummingbot/hummingbot/blob/master/scripts/1overN_portfolio.py) Run this script in Hummingbot (development branch): `start --script 1overN_portfolio.py` ### Spot Perp Arbitrage (Alex)  Alex created a simpler version of the [Spot-Perpetual Arbitrage](../../../strategies/v1-strategies/spot-perpetual-arbitrage.md) strategy, since the original strategy was found to have certain issues, including executing redundant trades. To address these issues and cater to those who lean towards a script-based format, the original code has been reformatted and improved. Now, users who favor a script-based approach can implement the strategy more efficiently.  This strategy monitors prices on spot and derivative connectors, starting trades when price differences exceed a **min__divergence** threshold and closing positions when the spread drops below a **min__convergence** threshold, hence exploiting market inefficiencies for profit. Explore and use the script: [https://github.com/hummingbot/hummingbot/blob/master/scripts/spot_perp_arb.py](https://github.com/hummingbot/hummingbot/blob/master/scripts/spot_perp_arb.py) Run this script in Hummingbot (development branch): `start --script spot_perp_arb.py` ### Backtestable Market Making (Mike)  Since the recently added Candles Feed feature introduces new possibilities for script types, Hummingbot co-founder Mike created a sample script that implements a simple backtest of a market making strategy. Backtesting with historical OHLCV data provides a rough way for users to assess the potential performance and efficacy of a market making strategy based on past market conditions. Explore and use the script: [https://github.com/hummingbot/hummingbot/blob/master/scripts/backtest_mm_example.py](https://github.com/hummingbot/hummingbot/blob/master/scripts/backtest_mm_example.py) ### Leeks Reaper Strategy (Dolm)  Dolm, OG leader of the Hummingbot WeChat group and Botcamp mentor, created a strategy that swiftly places orders to track price movements, termed in Mandarin as "chasing the rise and killing the fall", designed to enable profit locking and loss prevention.  In 2017, this strategy enjoyed widespread popularity among Chinese traders, who took advantage of low or non-existent trading fees at exchanges during the earlier days. However, due to its high-frequency nature, the strategy's efficacy waned with the rise of trading fees. Nevertheless, maintaining this script could prove advantageous, should any exchanges decide to roll out no-fee promotions in the near future. Explore and use the script: [https://gist.github.com/whoareyou40/c1d2568eda067f224e278e969e1530b6](https://gist.github.com/whoareyou40/c1d2568eda067f224e278e969e1530b6) ---  Learn how to create custom trading strategies like these by joining our next cohort of Botcamp, which starts on **June 27, 2023.** We cap the number of students in order to deliver a high quality experience to all participants, so [reserve your spot](https://botcamp.hummingbot.org/) today before they are all gone! At Hummingbot Foundation, our mission is to **democratize quantitative trading**. Botcamp provides hand-on training that helps students learn to create sophisticated trading strategies using Hummingbot, while at the same time creating **open source examples** for future Hummingbot users!
Shown in full with attribution under the source's licence. Licence: Apache-2.0
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.