コード例 #1
0
ファイル: backtest.py プロジェクト: rngrofl/kuegiBot
                        atr_factor=1).withExitModule(
                            SimpleBE(factor=0.6, buffer=0.4)).withExitModule(
                                SimpleBE(factor=1.6,
                                         buffer=0.8)).withExitModule(
                                             ParaTrail(
                                                 accInit=0.007,
                                                 accInc=0.018,
                                                 accMax=0.07)).withEntryFilter(
                                                     DayOfWeekFilter(v[0])))
        BackTest(bot, bars).run()

        if not increment(min, max, steps, v):
            break


bars_b = load_bars(30 * 14, 240, 0, 'bybit')
#bars_m = load_bars(30 * 24, 240,0,'bitmex')

#bars_b = load_bars(30 * 12, 60,0,'bybit')
#bars_m = load_bars(30 * 24, 60,0,'bitmex')

#bars1= load_bars(24)
#bars2= process_low_tf_bars(m1_bars, 240, 60)
#bars3= process_low_tf_bars(m1_bars, 240, 120)
#bars4= process_low_tf_bars(m1_bars, 240, 180)

#runOpti(bars_b,[8],[30],[2])
'''

KuegiBot weekdays bybit rel / maxDD
Monday: 0.29 / 8
コード例 #2
0
        bot = MultiStrategyBot(logger=logger, directionFilter=0)
        bot.add_strategy(SfpStrategy().withEntryFilter(
            DayOfWeekFilter(1 << i)))

        b = BackTest(bot, bars, symbol).run()


pair = "BTCUSD"
#pair= "ETHUSD"

funding = load_funding('bybit', pair)

#bars_p = load_bars(30 * 12, 240,0,'phemex')
#bars_n = load_bars(30 * 12, 240,0,'binance_f')
#bars_ns = load_bars(30 * 24, 240,0,'binanceSpot')
bars_b = load_bars(30 * 18, 240, 0, 'bybit', pair)
#bars_m = load_bars(30 * 12, 240,0,'bitmex')

#bars_b = load_bars(30 * 12, 60,0,'bybit')
#bars_m = load_bars(30 * 24, 60,0,'bitmex')

#bars1= load_bars(24)
#bars2= process_low_tf_bars(m1_bars, 240, 60)
#bars3= process_low_tf_bars(m1_bars, 240, 120)
#bars4= process_low_tf_bars(m1_bars, 240, 180)

symbol = None
if pair == "BTCUSD":
    symbol = Symbol(symbol="BTCUSD",
                    isInverse=True,
                    tickSize=0.5,
コード例 #3
0
ファイル: backtest.py プロジェクト: matt-tibbett/kuegiBot
                                and not increment(min, max, steps, v)):
            break


def checkDayFilterByDay(bars, symbol=None):
    for i in range(7):
        msg = str(i)
        logger.info(msg)
        bot = MultiStrategyBot(logger=logger, directionFilter=0)
        bot.add_strategy(SfpStrategy().withEntryFilter(
            DayOfWeekFilter(1 << i)))

        b = BackTest(bot, bars, symbol).run()


bars_p = load_bars(30 * 12, 240, 0, 'phemex')
#bars_n = load_bars(30 * 12, 240,0,'binance')
#bars_ns = load_bars(30 * 24, 240,0,'binanceSpot')
#bars_b = load_bars(30 * 18, 240,0,'bybit')
#bars_m = load_bars(30 * 12, 240,0,'bitmex')

#bars_b = load_bars(30 * 12, 60,0,'bybit')
#bars_m = load_bars(30 * 24, 60,0,'bitmex')

#bars1= load_bars(24)
#bars2= process_low_tf_bars(m1_bars, 240, 60)
#bars3= process_low_tf_bars(m1_bars, 240, 120)
#bars4= process_low_tf_bars(m1_bars, 240, 180)

#runOpti(bars_m,[1],[63],[1])
'''
コード例 #4
0
ファイル: backtest.py プロジェクト: xn2333/kuegiBot
        if randomCount == 0 or (randomCount < 0 and not increment(min,max,steps,v)):
            break


def checkDayFilterByDay(bars,symbol= None):
    for i in range(7):
        msg = str(i)
        logger.info(msg)
        bot = MultiStrategyBot(logger=logger, directionFilter=0)
        bot.add_strategy(SfpStrategy()
                         .withEntryFilter(DayOfWeekFilter(1 << i))
                         )

        b= BackTest(bot, bars,symbol).run()

bars_n = load_bars(30 * 12, 240,0,'binance')
#bars_ns = load_bars(30 * 24, 240,0,'binanceSpot')
#bars_b = load_bars(30 * 18, 240,0,'bybit')
#bars_m = load_bars(30 * 12, 240,0,'bitmex')

#bars_b = load_bars(30 * 12, 60,0,'bybit')
#bars_m = load_bars(30 * 24, 60,0,'bitmex')

#bars1= load_bars(24)
#bars2= process_low_tf_bars(m1_bars, 240, 60)
#bars3= process_low_tf_bars(m1_bars, 240, 120)
#bars4= process_low_tf_bars(m1_bars, 240, 180)

#runOpti(bars_m,[1],[63],[1])

'''
コード例 #5
0
ファイル: backtest.py プロジェクト: swissbeats93/kuegiBot
#pair= "ETHUSD"

exchange = 'bybit'

tf = 240
monthsBack = 18

if exchange == 'bybit' and "USDT" in pair:
    exchange = 'bybit-linear'

funding = load_funding(exchange, pair)

#bars_p = load_bars(30 * 12, 240,0,'phemex')
#bars_n = load_bars(30 * 12, 240,0,'binance_f')
#bars_ns = load_bars(30 * 24, 240,0,'binanceSpot')
bars_b = load_bars(30 * monthsBack, tf, 0, exchange, pair)
#bars_m = load_bars(30 * 12, 240,0,'bitmex')

#bars_b = load_bars(30 * 12, 60,0,'bybit')
#bars_m = load_bars(30 * 24, 60,0,'bitmex')

#bars1= load_bars(24)
#bars2= process_low_tf_bars(m1_bars, 240, 60)
#bars3= process_low_tf_bars(m1_bars, 240, 120)
#bars4= process_low_tf_bars(m1_bars, 240, 180)

symbol = None
if pair == "BTCUSD":
    symbol = Symbol(symbol="BTCUSD",
                    isInverse=True,
                    tickSize=0.5,
コード例 #6
0
ファイル: backtest.py プロジェクト: austinekrash/kuegiBot
def checkDayFilterByDay(bars,symbol= None):
    for i in range(7):
        msg = str(i)
        logger.info(msg)
        bot = MultiStrategyBot(logger=logger, directionFilter=0)
        bot.add_strategy(SfpStrategy()
                         .withEntryFilter(DayOfWeekFilter(1 << i))
                         )

        b= BackTest(bot, bars,symbol).run()

#bars_p = load_bars(30 * 12, 240,0,'phemex')
#bars_n = load_bars(30 * 12, 240,0,'binance')
#bars_ns = load_bars(30 * 24, 240,0,'binanceSpot')
bars_b = load_bars(30 * 18, 240,0,'bybit',"ETHUSD")
#bars_m = load_bars(30 * 12, 240,0,'bitmex')

#bars_b = load_bars(30 * 12, 60,0,'bybit')
#bars_m = load_bars(30 * 24, 60,0,'bitmex')

#bars1= load_bars(24)
#bars2= process_low_tf_bars(m1_bars, 240, 60)
#bars3= process_low_tf_bars(m1_bars, 240, 120)
#bars4= process_low_tf_bars(m1_bars, 240, 180)

symbol=Symbol(symbol="ETHUSD", isInverse=True, tickSize=0.05, lotSize=1.0, makerFee=-0.025,takerFee=0.075, quantityPrecision=2,pricePrecision=2)
#symbol=Symbol(symbol="BTCUSD", isInverse=True, tickSize=0.5, lotSize=1.0, makerFee=-0.025,takerFee=0.075, quantityPrecision=2,pricePrecision=2)
#for binance
#symbol=Symbol(symbol="BTCUSDT", isInverse=False, tickSize=0.001, lotSize=0.00001, makerFee=0.02, takerFee=0.04, quantityPrecision=5)