Skip to content

Bybit API integration with Backtrader. Run strategies for Backtest and Live Trading. Get historical price data for Bitcoin, Ethereum and all coins from Bybit. EASY create your strategies.

License

Notifications You must be signed in to change notification settings

WISEPLAT/backtrader_bybit

Repository files navigation

backtrader_bybit

Bybit API integration with Backtrader.

With this integration you can do:

  • Backtesting your strategy on historical data from the exchange Bybit + Backtrader // Backtesting
  • Launch trading systems for automatic trading on the exchange Bybit + Backtrader // Live trading
  • Download historical data for cryptocurrencies from the exchange Bybit

For API connection we are using library pybit.

βœ… Online Example for ByBit BACKTEST Trading Strategy for BTC and ETH #2

βœ… Online Example for LIVE Trading Strategy for Ethereum on Bybit

You can say Thanks:

USDT (Tron TRC20): TEHaXZX7KLjAm4eLWdf4VKfsqRUQpv8fTT

or by Binance ID 200640624 through the exchange (no commission)

or by Bybit UID 112927970 through the exchange (no commission)

Installation

  1. The simplest way:
pip install backtrader_bybit

or

git clone https://github.com/WISEPLAT/backtrader_bybit

or

pip install git+https://github.com/WISEPLAT/backtrader_bybit.git
  1. Please use backtrader from my repository (as your can push your commits in it). Install it:
pip install git+https://github.com/WISEPLAT/backtrader.git

-- Can I use your bybit interface with original backtrader?

-- Yes, you can use original backtrader, as the author of original backtrader had approved all my changes.

Here is the link: mementum/backtrader#472

  1. We have some dependencies, you need to install them:
pip install pybit pycryptodome backtrader pandas matplotlib

or

pip install -r requirements.txt

Getting started

To make it easier to figure out how everything works, many examples have been made in the folders DataExamplesBybit and StrategyExamplesBybit.

Before running the example, you need to get your API key, Secret key and Type of Account, and put them in the file ConfigBybit\Config.py:

# content of ConfigBybit\Config.py 
class Config:
    BYBIT_API_KEY = "YOUR_API_KEY"
    BYBIT_API_SECRET = "YOUR_SECRET_KEY"
    BYBIT_ACCOUNT_TYPE = "UNIFIED"  # UNIFIED or CONTRACT

How to get a Bybit API token:

  1. Register your account on Bybit
  2. Go to "Profile" -> "API Management"
  3. Then push the button "Create New Key" and select "System generated"
  4. In "API Key restrictions" enable "Read-Write" and in "Unified Trading"->"SPOT" enable "Trade"
  5. Copy and paste to the file **ConfigBybit\Config.py ** received "API key" and "Secret key"

Now you can run examples

The DataExamplesBybit folder contains the code of examples for working with exchange data via the Bybit API.

  • 01 - Symbol.py - trading strategy for obtaining historical and "live" data of one ticker for one timeframe
  • 02 - Symbol data to DF.py - export to csv file of historical data of one ticker for one timeframe
  • 03 - Symbols.py - trading strategy for multiple tickers on the same timeframe
  • 04 - Resample.py - trading strategy for obtaining data from one ticker for different timeframes by converting a smaller timeframe into a larger one
  • 05 - Replay.py - launching a trading strategy on a smaller timeframe, with processing on a larger one and displaying a larger interval chart
  • 06 - Rollover.py - launch of a trading strategy based on gluing data from a file with historical data and the last downloaded history from the broker
  • 08 - Timeframes.py - trading strategy is running on different timeframes.
  • 09 - Get Asset Info - through client.py - getting info about asset: balance, lot size, min price step, min value to buy and etc.
  • Strategy.py - An example of a trading strategy that only outputs data of the OHLCV for ticker/tickers

The StrategyExamplesBybit folder contains the code of sample strategies.

  • 01 - Live Trade - Just Buy and Sell.py - An example of a live trading strategy for ETH ticker on the base USDT ticker.

    • The strategy shows how to Buy at Market or Limit order and how to Cancel order.
    • Example of placing and cancel orders on the Bybit exchange.
      • Please be aware! This is Live order - if market has a big change down in value of price more than 5% - the order will be completed....
      • Please be aware! For Market order - it will be completed!
      • Do not forget to cancel the submitted orders from the exchange after the test!
  • 01 - Live Trade.py - An example of a live trading strategy for two BTC and ETH tickers on the base USDT ticker.

    • The strategy shows how to apply indicators (SMA, RSI) to several tickers at the same time.
    • Example of placing and cancel orders on the Bybit exchange.
      • Please be aware! This is Live order - if market has a big change down in value of price more than 5% - the order will be completed....
      • Do not forget to cancel the submitted orders from the exchange after the test!
  • 02 - Live Trade MultiPortfolio.py - An example of a live trading strategy for a set of tickers that can be transferred to the strategy in a list (BTC, ETH, BNB) on the base USDT ticker.

    • The strategy shows how to apply indicators (SMA, RSI) to several tickers at the same time.
    • Example of placing and cancel orders on the Bybit exchange.
      • Please be aware! This is Live order - if market has a big change down in value of price more than 5% - the order will be completed....
      • Do not forget to cancel the submitted orders from the exchange after the test!
  • 03 - Live Trade ETH.py - An example of a live trading strategy for two BNB and XMR tickers on the basic ETH ticker.

    • The strategy shows how to apply indicators (SMA, RSI) to several tickers at the same time.
    • Example of placing and cancel orders on the Bybit exchange.
      • Please be aware! This is Live order - if market has a big change down in value of price more than 5% - the order will be completed....
      • Do not forget to cancel the submitted orders from the exchange after the test!
  • 04 - Offline Backtest.py - An example of a trading strategy on a historical data - not live mode - for two BTC and ETH tickers on the base USDT ticker.

    • The strategy shows how to apply indicators (SMA, RSI) to several tickers at the same time.
      • Not a live mode - for testing strategies without sending orders to the exchange!
  • 05 - Offline Backtest MultiPortfolio.py - An example of a trading strategy on a historical data - not live mode - for a set of tickers that can be transferred to the strategy in a list (BTC, ETH, BNB) on the base USDT ticker.

    • The strategy shows how to apply indicators (SMA, RSI) to several tickers at the same time.
      • Not a live mode - for testing strategies without sending orders to the exchange!
  • 06 - Live Trade Just Buy and Close by Market.py - An example of a live trading strategy for ETH ticker on the base USDT ticker.

    • The strategy shows how to buy by close price and sell by market a little value of ETH after 3 bars.
    • Example of placing orders on the Bybit exchange.
      • Do not forget to cancel the submitted orders from the exchange after the test!
  • 07 - Offline Backtest Indicators.py - An example of a trading strategy for a history test using SMA and RSI indicators - not live mode - for two BTC and ETH tickers on the base USDT ticker.

    • The strategy shows how to apply indicators (SMA, RSI) to several tickers at the same time.
      • generates 177% of revenue at the time of video recording))
      • Non-live mode - for testing strategies without sending orders to the exchange!
  • 08 - Offline Backtest Margin Trade with Leverage 50x - Linear Trade.py - An example of a trading strategy with the use of margin Leverage 50x for a history backtest using SMA indicators - not live mode - for two BTC and ETH tickers on the base of USDT ticker.

    • The strategy shows how to apply indicators SMA to several tickers at the same time.
      • generates 792% of revenue at the time of file publishing
      • Non-live mode - for testing strategies without sending orders to the exchange!
    • The strategy shows how to use margin with Leverage 50x for backtest on history market data for cryptocurrencies.
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
Was money: 2000.00
Ending Portfolio Value: 17853.46
Remaining available funds: 4887.38
Assets in the amount of: 12966.08

2000.00 ==> 17853.46 ==> +792.67%

SQN:  AutoOrderedDict([('sqn', 1.0031776139642996), ('trades', 4)])
VWR:  OrderedDict([('vwr', 25.613023915870777)])
TDD:  OrderedDict([('maxdrawdown', 65.77087178559279), ('maxdrawdownperiod', 304)])
DD:  AutoOrderedDict([('len', 6), ('drawdown', 20.46618403019286), ('moneydown', 229.70872494394746), ('max', AutoOrderedDict([('len', 304), ('drawdown', 65.77087178559279), ('moneydown', 295.8359186842)]))])
AR:  OrderedDict([(2021, 0.0), (2022, -0.42822236821405035), (2023, 4.540830244681184), (2024, 1.8176719585784271)])
Profitability:  OrderedDict([('rtot', 2.1890502317806253), ('ravg', 0.0022178827069712515), ('rnorm', 0.7487590850582526), ('rnorm100', 74.87590850582527)])
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

Thanks

  • backtrader: Very simple and cool library!
  • pybit: For creating Bybit API wrapper, shortening a lot of work.

License

MIT

Important

Error correction, revision and development of the library is carried out by the author and the community!

Push your commits!

Terms of Use

The backtrader_bybit library, which allows you to integrate Backtrader and Bybit API, is the Program created solely for the convenience of work. When using the Program, the User is obliged to comply with the provisions of the current legislation of his country. Using the Program are offered on an "AS IS" basis. No guarantees, either oral or written, are attached and are not provided. The author and the community does not guarantee that all errors of the Program have been eliminated, respectively, the author and the community do not bear any responsibility for the consequences of using the Program, including, but not limited to, any damage to equipment, computers, mobile devices, User software caused by or related to the use of the Program, as well as for any financial losses incurred by the User as a result of using the Program. No one is responsible for data loss, losses, damages, including accidental or indirect, lost profits, loss of revenue or any other losses related to the use of the Program.

The Program is distributed under the terms of the MIT license.

Star History

Please put a Star 🌟 for this code

Star History Chart

ΠŸΠΎΠΆΠ°Π»ΡƒΠΉΡΡ‚Π°, ΠΏΠΎΡΡ‚Π°Π²ΡŒΡ‚Π΅ Π—Π²Π΅Π·Π΄Ρƒ 🌟 этому ΠΊΠΎΠ΄Ρƒ

==========================================================================

backtrader_bybit

Π˜Π½Ρ‚Π΅Π³Ρ€Π°Ρ†ΠΈΡ Bybit API с Backtrader.

Π‘ ΠΏΠΎΠΌΠΎΡ‰ΡŒΡŽ этой ΠΈΠ½Ρ‚Π΅Π³Ρ€Π°Ρ†ΠΈΠΈ Π²Ρ‹ ΠΌΠΎΠΆΠ΅Ρ‚Π΅ Π΄Π΅Π»Π°Ρ‚ΡŒ:

  • ВСстированиС вашСй стратСгии Π½Π° историчСских Π΄Π°Π½Π½Ρ‹Ρ… с Π±ΠΈΡ€ΠΆΠΈ Bybit + Backtrader
  • Π—Π°ΠΏΡƒΡΠΊΠ°Ρ‚ΡŒ Ρ‚ΠΎΡ€Π³ΠΎΠ²Ρ‹Π΅ систСмы для автоматичСской Ρ‚ΠΎΡ€Π³ΠΎΠ²Π»ΠΈ Π½Π° Π±ΠΈΡ€ΠΆΠ΅ Bybit + Backtrader
  • Π—Π°Π³Ρ€ΡƒΠΆΠ°Ρ‚ΡŒ историчСскиС Π΄Π°Π½Π½Ρ‹Π΅ ΠΏΠΎ ΠΊΡ€ΠΈΠΏΡ‚ΠΎΠ²Π°Π»ΡŽΡ‚Π°ΠΌ с Π±ΠΈΡ€ΠΆΠΈ Bybit

Для ΠΏΠΎΠ΄ΠΊΠ»ΡŽΡ‡Π΅Π½ΠΈΡ ΠΊ API ΠΌΡ‹ ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΡƒΠ΅ΠΌ Π±ΠΈΠ±Π»ΠΈΠΎΡ‚Π΅ΠΊΡƒ pybit.

βœ… Online ΠŸΡ€ΠΈΠΌΠ΅Ρ€ для ByBit BACKTEST Trading Strategy for BTC and ETH #2

βœ… Online ΠŸΡ€ΠΈΠΌΠ΅Ρ€ для LIVE Trading Strategy for Ethereum on Bybit

МоТно ΡΠΊΠ°Π·Π°Ρ‚ΡŒ Бпасибо:

USDT (Tron TRC20): TEHaXZX7KLjAm4eLWdf4VKfsqRUQpv8fTT

ΠΈΠ»ΠΈ ΠΏΠΎ Binance ID 200640624 Ρ‡Π΅Ρ€Π΅Π· Π±ΠΈΡ€ΠΆΡƒ (Π±Π΅Π· комиссии)

ΠΈΠ»ΠΈ ΠΏΠΎ Bybit UID 112927970 Ρ‡Π΅Ρ€Π΅Π· Π±ΠΈΡ€ΠΆΡƒ (Π±Π΅Π· комиссии)

Установка

  1. Π‘Π°ΠΌΡ‹ΠΉ простой способ:
pip install backtrader_bybit

ΠΈΠ»ΠΈ

git clone https://github.com/WISEPLAT/backtrader_bybit

ΠΈΠ»ΠΈ

pip install git+https://github.com/WISEPLAT/backtrader_bybit.git
  1. ΠŸΠΎΠΆΠ°Π»ΡƒΠΉΡΡ‚Π°, ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΡƒΠΉΡ‚Π΅ backtrader ΠΈΠ· ΠΌΠΎΠ΅Π³ΠΎ рСпозитория (Ρ‚Π°ΠΊ ΠΊΠ°ΠΊ Π²Ρ‹ ΠΌΠΎΠΆΠ΅Ρ‚Π΅ Ρ€Π°Π·ΠΌΠ΅Ρ‰Π°Ρ‚ΡŒ Π² Π½Π΅ΠΌ свои ΠΊΠΎΠΌΠΌΠΈΡ‚Ρ‹). УстановитС Π΅Π³ΠΎ:
pip install git+https://github.com/WISEPLAT/backtrader.git

-- ΠœΠΎΠ³Ρƒ Π»ΠΈ я ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚ΡŒ ваш интСрфСйс bybit с ΠΎΡ€ΠΈΠ³ΠΈΠ½Π°Π»ΡŒΠ½Ρ‹ΠΌ backtrader?

-- Π”Π°, Π²Ρ‹ ΠΌΠΎΠΆΠ΅Ρ‚Π΅ ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚ΡŒ ΠΎΡ€ΠΈΠ³ΠΈΠ½Π°Π»ΡŒΠ½Ρ‹ΠΉ backtrader, Ρ‚Π°ΠΊ ΠΊΠ°ΠΊ Π°Π²Ρ‚ΠΎΡ€ ΠΎΡ€ΠΈΠ³ΠΈΠ½Π°Π»ΡŒΠ½ΠΎΠ³ΠΎ backtrader ΠΎΠ΄ΠΎΠ±Ρ€ΠΈΠ» всС ΠΌΠΎΠΈ измСнСния.

Π’ΠΎΡ‚ ссылка: mementum/backtrader#472

  1. Π£ нас Π΅ΡΡ‚ΡŒ Π½Π΅ΠΊΠΎΡ‚ΠΎΡ€Ρ‹Π΅ зависимости, Π²Π°ΠΌ Π½ΡƒΠΆΠ½ΠΎ ΠΈΡ… ΡƒΡΡ‚Π°Π½ΠΎΠ²ΠΈΡ‚ΡŒ:
pip install pybit pycryptodome backtrader pandas matplotlib

ΠΈΠ»ΠΈ

pip install -r requirements.txt

Начало Ρ€Π°Π±ΠΎΡ‚Ρ‹

Π§Ρ‚ΠΎΠ±Ρ‹ Π±Ρ‹Π»ΠΎ Π»Π΅Π³Ρ‡Π΅ Ρ€Π°Π·ΠΎΠ±Ρ€Π°Ρ‚ΡŒΡΡ ΠΊΠ°ΠΊ всё Ρ€Π°Π±ΠΎΡ‚Π°Π΅Ρ‚, сдСлано мноТСство ΠΏΡ€ΠΈΠΌΠ΅Ρ€ΠΎΠ² Π² ΠΏΠ°ΠΏΠΊΠ°Ρ… DataExamplesBybit_ru ΠΈ StrategyExamplesBybit_ru.

ΠŸΠ΅Ρ€Π΅Π΄ запуском ΠΏΡ€ΠΈΠΌΠ΅Ρ€Π°, Π½Π΅ΠΎΠ±Ρ…ΠΎΠ΄ΠΈΠΌΠΎ ΠΏΠΎΠ»ΡƒΡ‡ΠΈΡ‚ΡŒ свой API ΠΊΠ»ΡŽΡ‡, Secret ΠΊΠ»ΡŽΡ‡ ΠΈ Π’ΠΈΠΏ Π°ΠΊΠΊΠ°ΡƒΠ½Ρ‚Π°, ΠΈ ΠΏΡ€ΠΎΠΏΠΈΡΠ°Ρ‚ΡŒ ΠΈΡ… Π² Ρ„Π°ΠΉΠ»Π΅ ConfigBybit\Config.py:

# content of ConfigBybit\Config.py 
class Config:
    BYBIT_API_KEY = "YOUR_API_KEY"
    BYBIT_API_SECRET = "YOUR_SECRET_KEY"
    BYBIT_ACCOUNT_TYPE = "UNIFIED"  # UNIFIED or CONTRACT

Как ΠΏΠΎΠ»ΡƒΡ‡ΠΈΡ‚ΡŒ Ρ‚ΠΎΠΊΠ΅Π½ Bybit API:

  1. ЗарСгистрируйтС свой Π°ΠΊΠΊΠ°ΡƒΠ½Ρ‚ Π½Π° Bybit
  2. ΠŸΠ΅Ρ€Π΅ΠΉΠ΄ΠΈΡ‚Π΅ Π² "ΠŸΡ€ΠΎΡ„ΠΈΠ»ΡŒ" -> """Π£ΠΏΡ€Π°Π²Π»Π΅Π½ΠΈΠ΅ API"
  3. Π—Π°Ρ‚Π΅ΠΌ Π½Π°ΠΆΠΌΠΈΡ‚Π΅ ΠΊΠ½ΠΎΠΏΠΊΡƒ "Π‘ΠΎΠ·Π΄Π°Ρ‚ΡŒ Новый ΠšΠ»ΡŽΡ‡" ΠΈ Π²Ρ‹Π±Π΅Ρ€ΠΈΡ‚Π΅ "Π‘Π³Π΅Π½Π΅Ρ€ΠΈΡ€ΠΎΠ²Π°Π½Π½Ρ‹ΠΉ систСмой".
  4. Π’ Ρ€Π°Π·Π΄Π΅Π»Π΅ "Π Π°Π·Ρ€Π΅ΡˆΠ΅Π½ΠΈΡ API ΠΊΠ»ΡŽΡ‡Π°" Π²ΠΊΠ»ΡŽΡ‡ΠΈΡ‚Π΅ ""Π§Ρ‚Π΅Π½ΠΈΠ΅ ΠΈ запись" ΠΈ Π² "Π•Π΄ΠΈΠ½Ρ‹ΠΉ Ρ‚ΠΎΡ€Π³ΠΎΠ²Ρ‹ΠΉ Π°ΠΊΠΊΠ°ΡƒΠ½Ρ‚"->"БПОВ" Π²ΠΊΠ»ΡŽΡ‡ΠΈΡ‚Π΅ "Π’ΠΎΡ€Π³ΠΎΠ²Π°Ρ‚ΡŒ".
  5. Π‘ΠΊΠΎΠΏΠΈΡ€ΡƒΠΉΡ‚Π΅ ΠΈ Π²ΡΡ‚Π°Π²ΡŒΡ‚Π΅ Π² Ρ„Π°ΠΉΠ» ConfigBybit\Config.py ΠΏΠΎΠ»ΡƒΡ‡Π΅Π½Π½Ρ‹Π΅ "ΠšΠ»ΡŽΡ‡ API" ΠΈ "Π‘Π΅ΠΊΡ€Π΅Ρ‚Π½Ρ‹ΠΉ ΠΊΠ»ΡŽΡ‡"

Π’Π΅ΠΏΠ΅Ρ€ΡŒ ΠΌΠΎΠΆΠ½ΠΎ Π·Π°ΠΏΡƒΡΠΊΠ°Ρ‚ΡŒ ΠΏΡ€ΠΈΠΌΠ΅Ρ€Ρ‹

Π’ ΠΏΠ°ΠΏΠΊΠ΅ DataExamplesBybit_ru находится ΠΊΠΎΠ΄ ΠΏΡ€ΠΈΠΌΠ΅Ρ€ΠΎΠ² ΠΏΠΎ Ρ€Π°Π±ΠΎΡ‚Π΅ с Π±ΠΈΡ€ΠΆΠ΅Π²Ρ‹ΠΌΠΈ Π΄Π°Π½Π½Ρ‹ΠΌΠΈ Ρ‡Π΅Ρ€Π΅Π· API интСрфСйс Bybit.

  • 01 - Symbol.py - торговая стратСгия для получСния историчСских ΠΈ "ΠΆΠΈΠ²Ρ‹Ρ…" Π΄Π°Π½Π½Ρ‹Ρ… ΠΎΠ΄Π½ΠΎΠ³ΠΎ Ρ‚ΠΈΠΊΠ΅Ρ€Π° ΠΏΠΎ ΠΎΠ΄Π½ΠΎΠΌΡƒ Ρ‚Π°ΠΉΠΌΡ„Ρ€Π΅ΠΉΠΌΡƒ
  • 02 - Symbol data to DF.py - экспорт Π² csv Ρ„Π°ΠΉΠ» историчСских Π΄Π°Π½Π½Ρ‹Ρ… ΠΎΠ΄Π½ΠΎΠ³ΠΎ Ρ‚ΠΈΠΊΠ΅Ρ€Π° ΠΏΠΎ ΠΎΠ΄Π½ΠΎΠΌΡƒ Ρ‚Π°ΠΉΠΌΡ„Ρ€Π΅ΠΉΠΌΡƒ
  • 03 - Symbols.py - торговая стратСгия для Π½Π΅ΡΠΊΠΎΠ»ΡŒΠΊΠΈΡ… Ρ‚ΠΈΠΊΠ΅Ρ€ΠΎΠ² ΠΏΠΎ ΠΎΠ΄Π½ΠΎΠΌΡƒ Ρ‚Π°ΠΉΠΌΡ„Ρ€Π΅ΠΉΠΌΡƒ
  • 04 - Resample.py - торговая стратСгия для получСния Π΄Π°Π½Π½Ρ‹Ρ… ΠΎΠ΄Π½ΠΎΠ³ΠΎ Ρ‚ΠΈΠΊΠ΅Ρ€Π° ΠΏΠΎ Ρ€Π°Π·Π½Ρ‹ΠΌ Ρ‚Π°ΠΉΠΌΡ„Ρ€Π΅ΠΉΠΌΠ°ΠΌ ΠΌΠ΅Ρ‚ΠΎΠ΄ΠΎΠΌ ΠΊΠΎΠ½Π²Π΅Ρ€Ρ‚Π°Ρ†ΠΈΠΈ мСньшСго Ρ‚Π°ΠΉΠΌΡ„Ρ€Π΅ΠΉΠΌΠ° Π² больший
  • 05 - Replay.py - запуск Ρ‚ΠΎΡ€Π³ΠΎΠ²ΠΎΠΉ стратСгии Π½Π° мСньшСм Ρ‚Π°ΠΉΠΌΡ„Ρ€Π΅ΠΉΠΌΠ΅, с ΠΎΠ±Ρ€Π°Π±ΠΎΡ‚ΠΊΠΎΠΉ Π½Π° большСм ΠΈ Π²Ρ‹Π²ΠΎΠ΄ΠΎΠΌ Π³Ρ€Π°Ρ„ΠΈΠΊΠ° большСго ΠΈΠ½Ρ‚Π΅Ρ€Π²Π°Π»Π°
  • 06 - Rollover.py - запуск Ρ‚ΠΎΡ€Π³ΠΎΠ²ΠΎΠΉ стратСгии Π½Π° склСйкС Π΄Π°Π½Π½Ρ‹Ρ… ΠΈΠ· Ρ„Π°ΠΉΠ»Π° с историчСскими Π΄Π°Π½Π½Ρ‹ΠΌΠΈ ΠΈ послСднСй Π·Π°Π³Ρ€ΡƒΠΆΠ΅Π½Π½ΠΎΠΉ истории с Π±Ρ€ΠΎΠΊΠ΅Ρ€Π°
  • 08 - Timeframes.py - торговая стратСгия для ΠΎΠ΄Π½ΠΎΠ³ΠΎ Ρ‚ΠΈΠΊΠ΅Ρ€Π° ΠΏΠΎ Ρ€Π°Π·Π½Ρ‹ΠΌ Ρ‚Π°ΠΉΠΌΡ„Ρ€Π΅ΠΉΠΌΠ°ΠΌ
  • 09 - Get Asset Info - through client.py - ΠΏΠΎΠ»ΡƒΡ‡Π΅Π½ΠΈΠ΅ ΠΈΠ½Ρ„ΠΎΡ€ΠΌΠ°Ρ†ΠΈΠΈ ΠΎΠ± Π°ΠΊΡ‚ΠΈΠ²Π΅: баланс, Ρ€Π°Π·ΠΌΠ΅Ρ€ Π»ΠΎΡ‚Π°, ΠΌΠΈΠ½ΠΈΠΌΠ°Π»ΡŒΠ½Ρ‹ΠΉ шаг Ρ†Π΅Π½Ρ‹, минимальная ΡΡ‚ΠΎΠΈΠΌΠΎΡΡ‚ΡŒ ΠΏΠΎΠΊΡƒΠΏΠΊΠΈ ΠΈ Ρ‚.Π΄.
  • Strategy.py - ΠŸΡ€ΠΈΠΌΠ΅Ρ€ Ρ‚ΠΎΡ€Π³ΠΎΠ²ΠΎΠΉ стратСгии, которая Ρ‚ΠΎΠ»ΡŒΠΊΠΎ Π²Ρ‹Π²ΠΎΠ΄ΠΈΡ‚ Π΄Π°Π½Π½Ρ‹Π΅ ΠΏΠΎ Ρ‚ΠΈΠΊΠ΅Ρ€Ρƒ/Ρ‚ΠΈΠΊΠ΅Ρ€Π°ΠΌ OHLCV

Π’ ΠΏΠ°ΠΏΠΊΠ΅ StrategyExamplesBybit_ru находится ΠΊΠΎΠ΄ ΠΏΡ€ΠΈΠΌΠ΅Ρ€ΠΎΠ² стратСгий.

  • 01 - Live Trade - Just Buy and Sell.py - ΠŸΡ€ΠΈΠΌΠ΅Ρ€ Ρ‚ΠΎΡ€Π³ΠΎΠ²ΠΎΠΉ стратСгии Π² live Ρ€Π΅ΠΆΠΈΠΌΠ΅ для ETH Π½Π° Π±Π°Π·ΠΎΠ²ΠΎΠΌ Ρ‚ΠΈΠΊΠ΅Ρ€Π΅ USDT.

    • Π’ стратСгии ΠΏΠΎΠΊΠ°Π·Π°Π½ΠΎ ΠΊΠ°ΠΊ Π²Ρ‹ΡΡ‚Π°Π²Π»ΡΡ‚ΡŒ ΠžΡ€Π΄Π΅Ρ€ ΠΏΠΎ Π Ρ‹Π½ΠΊΡƒ ΠΈ Π›ΠΈΠΌΠΈΡ‚Π½Ρ‹ΠΉ ΠΎΡ€Π΄Π΅Ρ€ ΠΈ ΠΊΠ°ΠΊ ΠΎΡ‚ΠΌΠ΅Π½ΡΡ‚ΡŒ ΠΎΡ€Π΄Π΅Ρ€.
    • ΠŸΡ€ΠΈΠΌΠ΅Ρ€ выставлСния заявок Π½Π° Π±ΠΈΡ€ΠΆΡƒ Bybit ΠΈ ΠΈΡ… снятиС.
      • ΠŸΠΎΠΆΠ°Π»ΡƒΠΉΡΡ‚Π°, ΠΈΠΌΠ΅ΠΉΡ‚Π΅ Π² Π²ΠΈΠ΄Ρƒ! Π­Ρ‚ΠΎ live Ρ€Π΅ΠΆΠΈΠΌ - Ссли Π½Π° Ρ€Ρ‹Π½ΠΊΠ΅ ΠΏΡ€ΠΎΠΈΠ·ΠΎΠΉΠ΄Π΅Ρ‚ Π·Π½Π°Ρ‡ΠΈΡ‚Π΅Π»ΡŒΠ½ΠΎΠ΅ ΠΈΠ·ΠΌΠ΅Π½Π΅Π½ΠΈΠ΅ Ρ†Π΅Π½Ρ‹ Π² сторону пониТСния Π±ΠΎΠ»Π΅Π΅ Ρ‡Π΅ΠΌ Π½Π° 5% - ΠΎΡ€Π΄Π΅Ρ€ ΠΌΠΎΠΆΠ΅Ρ‚ Π±Ρ‹Ρ‚ΡŒ Π²Ρ‹ΠΏΠΎΠ»Π½Π΅Π½....
      • ΠŸΠΎΠΆΠ°Π»ΡƒΠΉΡΡ‚Π°, ΠΈΠΌΠ΅ΠΉΡ‚Π΅ Π² Π²ΠΈΠ΄Ρƒ! Для ΠΎΡ€Π΄Π΅Ρ€Π° ΠΏΠΎ Π Ρ‹Π½ΠΊΡƒ - ΠΎΠ½ Π±ΡƒΠ΄Π΅Ρ‚ Π²Ρ‹ΠΏΠΎΠ»Π½Π΅Π½....
      • НС Π·Π°Π±ΡƒΠ΄ΡŒΡ‚Π΅ послС тСста ΡΠ½ΡΡ‚ΡŒ с Π±ΠΈΡ€ΠΆΠΈ выставлСнныС заявки!
  • 01 - Live Trade.py - ΠŸΡ€ΠΈΠΌΠ΅Ρ€ Ρ‚ΠΎΡ€Π³ΠΎΠ²ΠΎΠΉ стратСгии Π² live Ρ€Π΅ΠΆΠΈΠΌΠ΅ для Π΄Π²ΡƒΡ… Ρ‚ΠΈΠΊΠ΅Ρ€ΠΎΠ² BTC ΠΈ ETH Π½Π° Π±Π°Π·ΠΎΠ²ΠΎΠΌ Ρ‚ΠΈΠΊΠ΅Ρ€Π΅ USDT.

    • Π’ стратСгии ΠΏΠΎΠΊΠ°Π·Π°Π½ΠΎ ΠΊΠ°ΠΊ ΠΏΡ€ΠΈΠΌΠ΅Π½ΡΡ‚ΡŒ ΠΈΠ½Π΄ΠΈΠΊΠ°Ρ‚ΠΎΡ€Ρ‹ (SMA, RSI) ΠΊ нСскольким Ρ‚ΠΈΠΊΠ΅Ρ€Π°ΠΌ ΠΎΠ΄Π½ΠΎΠ²Ρ€Π΅ΠΌΠ΅Π½Π½ΠΎ.
    • ΠŸΡ€ΠΈΠΌΠ΅Ρ€ выставлСния заявок Π½Π° Π±ΠΈΡ€ΠΆΡƒ Bybit ΠΈ ΠΈΡ… снятиС.
      • ΠŸΠΎΠΆΠ°Π»ΡƒΠΉΡΡ‚Π°, ΠΈΠΌΠ΅ΠΉΡ‚Π΅ Π² Π²ΠΈΠ΄Ρƒ! Π­Ρ‚ΠΎ live Ρ€Π΅ΠΆΠΈΠΌ - Ссли Π½Π° Ρ€Ρ‹Π½ΠΊΠ΅ ΠΏΡ€ΠΎΠΈΠ·ΠΎΠΉΠ΄Π΅Ρ‚ Π·Π½Π°Ρ‡ΠΈΡ‚Π΅Π»ΡŒΠ½ΠΎΠ΅ ΠΈΠ·ΠΌΠ΅Π½Π΅Π½ΠΈΠ΅ Ρ†Π΅Π½Ρ‹ Π² сторону пониТСния Π±ΠΎΠ»Π΅Π΅ Ρ‡Π΅ΠΌ Π½Π° 5% - ΠΎΡ€Π΄Π΅Ρ€ ΠΌΠΎΠΆΠ΅Ρ‚ Π±Ρ‹Ρ‚ΡŒ Π²Ρ‹ΠΏΠΎΠ»Π½Π΅Π½....
      • НС Π·Π°Π±ΡƒΠ΄ΡŒΡ‚Π΅ послС тСста ΡΠ½ΡΡ‚ΡŒ с Π±ΠΈΡ€ΠΆΠΈ выставлСнныС заявки!
  • 02 - Live Trade MultiPortfolio.py - ΠŸΡ€ΠΈΠΌΠ΅Ρ€ Ρ‚ΠΎΡ€Π³ΠΎΠ²ΠΎΠΉ стратСгии Π² live Ρ€Π΅ΠΆΠΈΠΌΠ΅ для мноТСства Ρ‚ΠΈΠΊΠ΅Ρ€ΠΎΠ², ΠΊΠΎΡ‚ΠΎΡ€Ρ‹Π΅ ΠΌΠΎΠΆΠ½ΠΎ ΠΏΠ΅Ρ€Π΅Π΄Π°Π²Π°Ρ‚ΡŒ Π² ΡΡ‚Ρ€Π°Ρ‚Π΅Π³ΠΈΡŽ списком (BTC, ETH, BNB) Π½Π° Π±Π°Π·ΠΎΠ²ΠΎΠΌ Ρ‚ΠΈΠΊΠ΅Ρ€Π΅ USDT.

    • Π’ стратСгии ΠΏΠΎΠΊΠ°Π·Π°Π½ΠΎ ΠΊΠ°ΠΊ ΠΏΡ€ΠΈΠΌΠ΅Π½ΡΡ‚ΡŒ ΠΈΠ½Π΄ΠΈΠΊΠ°Ρ‚ΠΎΡ€Ρ‹ (SMA, RSI) ΠΊ нСскольким Ρ‚ΠΈΠΊΠ΅Ρ€Π°ΠΌ ΠΎΠ΄Π½ΠΎΠ²Ρ€Π΅ΠΌΠ΅Π½Π½ΠΎ.
    • ΠŸΡ€ΠΈΠΌΠ΅Ρ€ выставлСния заявок Π½Π° Π±ΠΈΡ€ΠΆΡƒ Bybit ΠΈ ΠΈΡ… снятиС.
      • ΠŸΠΎΠΆΠ°Π»ΡƒΠΉΡΡ‚Π°, ΠΈΠΌΠ΅ΠΉΡ‚Π΅ Π² Π²ΠΈΠ΄Ρƒ! Π­Ρ‚ΠΎ live Ρ€Π΅ΠΆΠΈΠΌ - Ссли Π½Π° Ρ€Ρ‹Π½ΠΊΠ΅ ΠΏΡ€ΠΎΠΈΠ·ΠΎΠΉΠ΄Π΅Ρ‚ Π·Π½Π°Ρ‡ΠΈΡ‚Π΅Π»ΡŒΠ½ΠΎΠ΅ ΠΈΠ·ΠΌΠ΅Π½Π΅Π½ΠΈΠ΅ Ρ†Π΅Π½Ρ‹ Π² сторону пониТСния Π±ΠΎΠ»Π΅Π΅ Ρ‡Π΅ΠΌ Π½Π° 5% - ΠΎΡ€Π΄Π΅Ρ€ ΠΌΠΎΠΆΠ΅Ρ‚ Π±Ρ‹Ρ‚ΡŒ Π²Ρ‹ΠΏΠΎΠ»Π½Π΅Π½....
      • НС Π·Π°Π±ΡƒΠ΄ΡŒΡ‚Π΅ послС тСста ΡΠ½ΡΡ‚ΡŒ с Π±ΠΈΡ€ΠΆΠΈ выставлСнныС заявки!
  • 03 - Live Trade ETH.py - ΠŸΡ€ΠΈΠΌΠ΅Ρ€ Ρ‚ΠΎΡ€Π³ΠΎΠ²ΠΎΠΉ стратСгии Π² live Ρ€Π΅ΠΆΠΈΠΌΠ΅ для Π΄Π²ΡƒΡ… Ρ‚ΠΈΠΊΠ΅Ρ€ΠΎΠ² BNB ΠΈ XMR Π½Π° Π±Π°Π·ΠΎΠ²ΠΎΠΌ Ρ‚ΠΈΠΊΠ΅Ρ€Π΅ ETH.

    • Π’ стратСгии ΠΏΠΎΠΊΠ°Π·Π°Π½ΠΎ ΠΊΠ°ΠΊ ΠΏΡ€ΠΈΠΌΠ΅Π½ΡΡ‚ΡŒ ΠΈΠ½Π΄ΠΈΠΊΠ°Ρ‚ΠΎΡ€Ρ‹ (SMA, RSI) ΠΊ нСскольким Ρ‚ΠΈΠΊΠ΅Ρ€Π°ΠΌ ΠΎΠ΄Π½ΠΎΠ²Ρ€Π΅ΠΌΠ΅Π½Π½ΠΎ.
    • ΠŸΡ€ΠΈΠΌΠ΅Ρ€ выставлСния заявок Π½Π° Π±ΠΈΡ€ΠΆΡƒ Bybit ΠΈ ΠΈΡ… снятиС.
      • ΠŸΠΎΠΆΠ°Π»ΡƒΠΉΡΡ‚Π°, ΠΈΠΌΠ΅ΠΉΡ‚Π΅ Π² Π²ΠΈΠ΄Ρƒ! Π­Ρ‚ΠΎ live Ρ€Π΅ΠΆΠΈΠΌ - Ссли Π½Π° Ρ€Ρ‹Π½ΠΊΠ΅ ΠΏΡ€ΠΎΠΈΠ·ΠΎΠΉΠ΄Π΅Ρ‚ Π·Π½Π°Ρ‡ΠΈΡ‚Π΅Π»ΡŒΠ½ΠΎΠ΅ ΠΈΠ·ΠΌΠ΅Π½Π΅Π½ΠΈΠ΅ Ρ†Π΅Π½Ρ‹ Π² сторону пониТСния Π±ΠΎΠ»Π΅Π΅ Ρ‡Π΅ΠΌ Π½Π° 5% - ΠΎΡ€Π΄Π΅Ρ€ ΠΌΠΎΠΆΠ΅Ρ‚ Π±Ρ‹Ρ‚ΡŒ Π²Ρ‹ΠΏΠΎΠ»Π½Π΅Π½....
      • НС Π·Π°Π±ΡƒΠ΄ΡŒΡ‚Π΅ послС тСста ΡΠ½ΡΡ‚ΡŒ с Π±ΠΈΡ€ΠΆΠΈ выставлСнныС заявки!
  • 04 - Offline Backtest.py - ΠŸΡ€ΠΈΠΌΠ΅Ρ€ Ρ‚ΠΎΡ€Π³ΠΎΠ²ΠΎΠΉ стратСгии для тСста Π½Π° истории - Π½Π΅ live Ρ€Π΅ΠΆΠΈΠΌ - для Π΄Π²ΡƒΡ… Ρ‚ΠΈΠΊΠ΅Ρ€ΠΎΠ² BTC ΠΈ ETH Π½Π° Π±Π°Π·ΠΎΠ²ΠΎΠΌ Ρ‚ΠΈΠΊΠ΅Ρ€Π΅ USDT.

    • Π’ стратСгии ΠΏΠΎΠΊΠ°Π·Π°Π½ΠΎ ΠΊΠ°ΠΊ ΠΏΡ€ΠΈΠΌΠ΅Π½ΡΡ‚ΡŒ ΠΈΠ½Π΄ΠΈΠΊΠ°Ρ‚ΠΎΡ€Ρ‹ (SMA, RSI) ΠΊ нСскольким Ρ‚ΠΈΠΊΠ΅Ρ€Π°ΠΌ ΠΎΠ΄Π½ΠΎΠ²Ρ€Π΅ΠΌΠ΅Π½Π½ΠΎ.
      • НС live Ρ€Π΅ΠΆΠΈΠΌ - для тСстирования стратСгий Π±Π΅Π· ΠΎΡ‚ΠΏΡ€Π°Π²ΠΊΠΈ заявок Π½Π° Π±ΠΈΡ€ΠΆΡƒ!
  • 05 - Offline Backtest MultiPortfolio.py - ΠŸΡ€ΠΈΠΌΠ΅Ρ€ Ρ‚ΠΎΡ€Π³ΠΎΠ²ΠΎΠΉ стратСгии для тСста Π½Π° истории - Π½Π΅ live Ρ€Π΅ΠΆΠΈΠΌ - для мноТСства Ρ‚ΠΈΠΊΠ΅Ρ€ΠΎΠ², ΠΊΠΎΡ‚ΠΎΡ€Ρ‹Π΅ ΠΌΠΎΠΆΠ½ΠΎ ΠΏΠ΅Ρ€Π΅Π΄Π°Π²Π°Ρ‚ΡŒ Π² ΡΡ‚Ρ€Π°Ρ‚Π΅Π³ΠΈΡŽ списком (BTC, ETH, BNB) Π½Π° Π±Π°Π·ΠΎΠ²ΠΎΠΌ Ρ‚ΠΈΠΊΠ΅Ρ€Π΅ USDT.

    • Π’ стратСгии ΠΏΠΎΠΊΠ°Π·Π°Π½ΠΎ ΠΊΠ°ΠΊ ΠΏΡ€ΠΈΠΌΠ΅Π½ΡΡ‚ΡŒ ΠΈΠ½Π΄ΠΈΠΊΠ°Ρ‚ΠΎΡ€Ρ‹ (SMA, RSI) ΠΊ нСскольким Ρ‚ΠΈΠΊΠ΅Ρ€Π°ΠΌ ΠΎΠ΄Π½ΠΎΠ²Ρ€Π΅ΠΌΠ΅Π½Π½ΠΎ.
      • НС live Ρ€Π΅ΠΆΠΈΠΌ - для тСстирования стратСгий Π±Π΅Π· ΠΎΡ‚ΠΏΡ€Π°Π²ΠΊΠΈ заявок Π½Π° Π±ΠΈΡ€ΠΆΡƒ!
  • 06 - Live Trade Just Buy and Close by Market.py - ΠŸΡ€ΠΈΠΌΠ΅Ρ€ Ρ‚ΠΎΡ€Π³ΠΎΠ²ΠΎΠΉ стратСгии Π² live для Ρ‚ΠΈΠΊΠ΅Ρ€Π° ETH Π½Π° Π±Π°Π·ΠΎΠ²ΠΎΠΌ Ρ‚ΠΈΠΊΠ΅Ρ€Π΅ USDT.

    • БтратСгия ΠΏΠΎΠΊΠ°Π·Ρ‹Π²Π°Π΅Ρ‚, ΠΊΠ°ΠΊ ΠΏΠΎΠΊΡƒΠΏΠ°Ρ‚ΡŒ ΠΏΠΎ Ρ†Π΅Π½Π΅ закрытия ΠΈ ΠΏΡ€ΠΎΠ΄Π°Π²Π°Ρ‚ΡŒ ΠΏΠΎ Ρ€Ρ‹Π½ΠΎΡ‡Π½ΠΎΠΉ нСбольшоС количСство ETH Ρ‡Π΅Ρ€Π΅Π· 3 Π±Π°Ρ€Π°.
    • ΠŸΡ€ΠΈΠΌΠ΅Ρ€ размСщСния ΠΎΡ€Π΄Π΅Ρ€ΠΎΠ² Π½Π° Π±ΠΈΡ€ΠΆΠ΅ Bybit.
      • НС Π·Π°Π±ΡƒΠ΄ΡŒΡ‚Π΅ ΠΎΡ‚ΠΌΠ΅Π½ΠΈΡ‚ΡŒ выставлСнныС ΠΎΡ€Π΄Π΅Ρ€Π° с Π±ΠΈΡ€ΠΆΠΈ послС тСстирования!
  • 07 - Offline Backtest Indicators.py - ΠŸΡ€ΠΈΠΌΠ΅Ρ€ Ρ‚ΠΎΡ€Π³ΠΎΠ²ΠΎΠΉ стратСгии для тСста Π½Π° истории с использованиСм ΠΈΠ½Π΄ΠΈΠΊΠ°Ρ‚ΠΎΡ€ΠΎΠ² SMA ΠΈ RSI - Π½Π΅ live Ρ€Π΅ΠΆΠΈΠΌ - для Π΄Π²ΡƒΡ… Ρ‚ΠΈΠΊΠ΅Ρ€ΠΎΠ² BTC ΠΈ ETH Π½Π° Π±Π°Π·ΠΎΠ²ΠΎΠΌ Ρ‚ΠΈΠΊΠ΅Ρ€Π΅ USDT.

    • Π’ стратСгии ΠΏΠΎΠΊΠ°Π·Π°Π½ΠΎ ΠΊΠ°ΠΊ ΠΏΡ€ΠΈΠΌΠ΅Π½ΡΡ‚ΡŒ ΠΈΠ½Π΄ΠΈΠΊΠ°Ρ‚ΠΎΡ€Ρ‹ (SMA, RSI) ΠΊ нСскольким Ρ‚ΠΈΠΊΠ΅Ρ€Π°ΠΌ ΠΎΠ΄Π½ΠΎΠ²Ρ€Π΅ΠΌΠ΅Π½Π½ΠΎ.
      • Π³Π΅Π½Π΅Ρ€ΠΈΡ‚ 177% Π΄ΠΎΡ…ΠΎΠ΄Π° Π½Π° ΠΌΠΎΠΌΠ΅Π½Ρ‚ записи Π²ΠΈΠ΄Π΅ΠΎ ))
      • НС live Ρ€Π΅ΠΆΠΈΠΌ - для тСстирования стратСгий Π±Π΅Π· ΠΎΡ‚ΠΏΡ€Π°Π²ΠΊΠΈ заявок Π½Π° Π±ΠΈΡ€ΠΆΡƒ!
  • 08 - Offline Backtest Margin Trade with Leverage 50x - Linear Trade.py - ΠŸΡ€ΠΈΠΌΠ΅Ρ€ Ρ‚ΠΎΡ€Π³ΠΎΠ²ΠΎΠΉ стратСгии с использованиСм ΠΌΠ°Ρ€ΠΆΠΈΠ½Π°Π»ΡŒΠ½ΠΎΠ³ΠΎ ΠΏΠ»Π΅Ρ‡Π° 50x для историчСского бэктСста с использованиСм ΠΈΠ½Π΄ΠΈΠΊΠ°Ρ‚ΠΎΡ€ΠΎΠ² SMA - Π½Π΅ Π² Ρ€Π΅ΠΆΠΈΠΌΠ΅ Ρ€Π΅Π°Π»ΡŒΠ½ΠΎΠ³ΠΎ Π²Ρ€Π΅ΠΌΠ΅Π½ΠΈ - для Π΄Π²ΡƒΡ… Ρ‚ΠΈΠΊΠ΅Ρ€ΠΎΠ² BTC ΠΈ ETH Π½Π° основС Ρ‚ΠΈΠΊΠ΅Ρ€Π° USDT.

    • БтратСгия ΠΏΠΎΠΊΠ°Π·Ρ‹Π²Π°Π΅Ρ‚, ΠΊΠ°ΠΊ ΠΏΡ€ΠΈΠΌΠ΅Π½ΡΡ‚ΡŒ ΠΈΠ½Π΄ΠΈΠΊΠ°Ρ‚ΠΎΡ€Ρ‹ SMA ΠΊ нСскольким Ρ‚ΠΈΠΊΠ΅Ρ€Π°ΠΌ ΠΎΠ΄Π½ΠΎΠ²Ρ€Π΅ΠΌΠ΅Π½Π½ΠΎ.
      • Π³Π΅Π½Π΅Ρ€ΠΈΡ€ΡƒΠ΅Ρ‚ 792% Π΄ΠΎΡ…ΠΎΠ΄Π° Π½Π° ΠΌΠΎΠΌΠ΅Π½Ρ‚ ΠΏΡƒΠ±Π»ΠΈΠΊΠ°Ρ†ΠΈΠΈ Ρ„Π°ΠΉΠ»Π°
      • НС live Ρ€Π΅ΠΆΠΈΠΌ - для тСстирования стратСгий Π±Π΅Π· ΠΎΡ‚ΠΏΡ€Π°Π²ΠΊΠΈ ΠΎΡ€Π΄Π΅Ρ€ΠΎΠ² Π½Π° Π±ΠΈΡ€ΠΆΡƒ!!
    • БтратСгия ΠΏΠΎΠΊΠ°Π·Ρ‹Π²Π°Π΅Ρ‚, ΠΊΠ°ΠΊ ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚ΡŒ ΠΌΠ°Ρ€ΠΆΠΈΠ½Π°Π»ΡŒΠ½ΡƒΡŽ Ρ‚ΠΎΡ€Π³ΠΎΠ²Π»ΡŽ с ΠΊΡ€Π΅Π΄ΠΈΡ‚Π½Ρ‹ΠΌ ΠΏΠ»Π΅Ρ‡ΠΎΠΌ 50x для тСстирования Π½Π° историчСских Ρ€Ρ‹Π½ΠΎΡ‡Π½Ρ‹Ρ… Π΄Π°Π½Π½Ρ‹Ρ… для ΠΊΡ€ΠΈΠΏΡ‚ΠΎΠ²Π°Π»ΡŽΡ‚.
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
Was money: 2000.00
Ending Portfolio Value: 17853.46
Remaining available funds: 4887.38
Assets in the amount of: 12966.08

2000.00 ==> 17853.46 ==> +792.67%

SQN:  AutoOrderedDict([('sqn', 1.0031776139642996), ('trades', 4)])
VWR:  OrderedDict([('vwr', 25.613023915870777)])
TDD:  OrderedDict([('maxdrawdown', 65.77087178559279), ('maxdrawdownperiod', 304)])
DD:  AutoOrderedDict([('len', 6), ('drawdown', 20.46618403019286), ('moneydown', 229.70872494394746), ('max', AutoOrderedDict([('len', 304), ('drawdown', 65.77087178559279), ('moneydown', 295.8359186842)]))])
AR:  OrderedDict([(2021, 0.0), (2022, -0.42822236821405035), (2023, 4.540830244681184), (2024, 1.8176719585784271)])
Profitability:  OrderedDict([('rtot', 2.1890502317806253), ('ravg', 0.0022178827069712515), ('rnorm', 0.7487590850582526), ('rnorm100', 74.87590850582527)])
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

Бпасибо

  • backtrader: ΠΎΡ‡Π΅Π½ΡŒ простая ΠΈ классная Π±ΠΈΠ±Π»ΠΈΠΎΡ‚Π΅ΠΊΠ°!
  • pybit: Для создания ΠΎΠ±ΠΎΠ»ΠΎΡ‡ΠΊΠΈ Bybit API, ΡΠΎΠΊΡ€Π°Ρ‰Π°ΡŽΡ‰Π΅ΠΉ Π±ΠΎΠ»ΡŒΡˆΡƒΡŽ Ρ‡Π°ΡΡ‚ΡŒ Ρ€Π°Π±ΠΎΡ‚Ρ‹.

Π’Π°ΠΆΠ½ΠΎ

Π˜ΡΠΏΡ€Π°Π²Π»Π΅Π½ΠΈΠ΅ ошибок, Π΄ΠΎΡ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΈ Ρ€Π°Π·Π²ΠΈΡ‚ΠΈΠ΅ Π±ΠΈΠ±Π»ΠΈΠΎΡ‚Π΅ΠΊΠΈ осущСствляСтся Π°Π²Ρ‚ΠΎΡ€ΠΎΠΌ ΠΈ сообщСством!

ΠŸΡƒΡˆΡŒΡ‚Π΅ ваши ΠΊΠΎΠΌΠΌΠΈΡ‚Ρ‹!

Условия использования

Π‘ΠΈΠ±Π»ΠΈΠΎΡ‚Π΅ΠΊΠ° backtrader_bybit ΠΏΠΎΠ·Π²ΠΎΠ»ΡΡŽΡ‰Π°Ρ Π΄Π΅Π»Π°Ρ‚ΡŒ ΠΈΠ½Ρ‚Π΅Π³Ρ€Π°Ρ†ΠΈΡŽ Backtrader ΠΈ Bybit API - это ΠŸΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ° созданная ΠΈΡΠΊΠ»ΡŽΡ‡ΠΈΡ‚Π΅Π»ΡŒΠ½ΠΎ для удобства Ρ€Π°Π±ΠΎΡ‚Ρ‹. ΠŸΡ€ΠΈ использовании ΠŸΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΡ‹ ΠŸΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚Π΅Π»ΡŒ обязан ΡΠΎΠ±Π»ΡŽΠ΄Π°Ρ‚ΡŒ полоТСния Π΄Π΅ΠΉΡΡ‚Π²ΡƒΡŽΡ‰Π΅Π³ΠΎ Π·Π°ΠΊΠΎΠ½ΠΎΠ΄Π°Ρ‚Π΅Π»ΡŒΡΡ‚Π²Π° Российской Π€Π΅Π΄Π΅Ρ€Π°Ρ†ΠΈΠΈ ΠΈΠ»ΠΈ своСй страны. ИспользованиС ΠŸΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΡ‹ прСдлагаСтся ΠΏΠΎ ΠΏΡ€ΠΈΠ½Ρ†ΠΈΠΏΡƒ «Как Π΅ΡΡ‚ΡŒΒ» (Β«AS ISΒ»). Никаких Π³Π°Ρ€Π°Π½Ρ‚ΠΈΠΉ, ΠΊΠ°ΠΊ устных, Ρ‚Π°ΠΊ ΠΈ ΠΏΠΈΡΡŒΠΌΠ΅Π½Π½Ρ‹Ρ… Π½Π΅ прилагаСтся ΠΈ Π½Π΅ прСдусматриваСтся. Автор ΠΈ сообщСство Π½Π΅ Π΄Π°Π΅Ρ‚ Π³Π°Ρ€Π°Π½Ρ‚ΠΈΠΈ, Ρ‡Ρ‚ΠΎ всС ошибки ΠŸΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΡ‹ Π±Ρ‹Π»ΠΈ устранСны, соотвСтствСнно Π°Π²Ρ‚ΠΎΡ€ ΠΈ сообщСство Π½Π΅ нСсСт Π½ΠΈΠΊΠ°ΠΊΠΎΠΉ отвСтствСнности Π·Π° послСдствия использования ΠŸΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΡ‹, Π²ΠΊΠ»ΡŽΡ‡Π°Ρ, Π½ΠΎ, Π½Π΅ ΠΎΠ³Ρ€Π°Π½ΠΈΡ‡ΠΈΠ²Π°ΡΡΡŒ Π»ΡŽΠ±Ρ‹ΠΌ ΡƒΡ‰Π΅Ρ€Π±ΠΎΠΌ ΠΎΠ±ΠΎΡ€ΡƒΠ΄ΠΎΠ²Π°Π½ΠΈΡŽ, ΠΊΠΎΠΌΠΏΡŒΡŽΡ‚Π΅Ρ€Π°ΠΌ, ΠΌΠΎΠ±ΠΈΠ»ΡŒΠ½Ρ‹ΠΌ устройствам, ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠΌΡƒ ΠΎΠ±Π΅ΡΠΏΠ΅Ρ‡Π΅Π½ΠΈΡŽ ΠŸΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚Π΅Π»Ρ Π²Ρ‹Π·Π²Π°Π½Π½Ρ‹ΠΌ ΠΈΠ»ΠΈ связанным с использованиСм ΠŸΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΡ‹, Π° Ρ‚Π°ΠΊΠΆΠ΅ Π·Π° Π»ΡŽΠ±Ρ‹Π΅ финансовыС ΠΏΠΎΡ‚Π΅Ρ€ΠΈ, понСсСнныС ΠŸΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚Π΅Π»Π΅ΠΌ Π² Ρ€Π΅Π·ΡƒΠ»ΡŒΡ‚Π°Ρ‚Π΅ использования ΠŸΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΡ‹. Никто Π½Π΅ отвСтствСнСн Π·Π° ΠΏΠΎΡ‚Π΅Ρ€ΡŽ Π΄Π°Π½Π½Ρ‹Ρ…, ΡƒΠ±Ρ‹Ρ‚ΠΊΠΈ, ΡƒΡ‰Π΅Ρ€Π±, Π²ΠΊΠ»ΡŽΡ‡Π°ΡŽ случайный ΠΈΠ»ΠΈ косвСнный, ΡƒΠΏΡƒΡ‰Π΅Π½Π½ΡƒΡŽ Π²Ρ‹Π³ΠΎΠ΄Ρƒ, ΠΏΠΎΡ‚Π΅Ρ€ΡŽ Π΄ΠΎΡ…ΠΎΠ΄ΠΎΠ² ΠΈΠ»ΠΈ Π»ΡŽΠ±Ρ‹Π΅ Π΄Ρ€ΡƒΠ³ΠΈΠ΅ ΠΏΠΎΡ‚Π΅Ρ€ΠΈ, связанныС с использованиСм ΠŸΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΡ‹.

ΠŸΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ° распространяСтся Π½Π° условиях Π»ΠΈΡ†Π΅Π½Π·ΠΈΠΈ MIT.