예제 #1
0
def Dependency(ctx):

    liqVol = constant(3)

    ctx.volumeStep = 70

    return [
        ctx.makeTrader_A(
            strategy.LiquidityProvider(event.Every(constant(1.)),
                                       order.side_price.Limit(volume=liqVol),
                                       initialValue=50.),
            "LiquidityProvider_A"),
        ctx.makeTrader_B(
            strategy.LiquidityProvider(event.Every(constant(1.)),
                                       order.side_price.Limit(volume=liqVol),
                                       initialValue=150.),
            "LiquidityProvider_B"),
        ctx.makeTrader_A(
            strategy.PairTrading(event.Every(constant(1.)),
                                 order.side.Market(),
                                 ctx.book_B,
                                 factor=2.), "A dependent on B ex"),
        ctx.makeTrader_B(
            strategy.PairTrading(event.Every(constant(1.)),
                                 order.side.Market(),
                                 ctx.book_A,
                                 factor=.5), "B dependent on A ex"),
    ]
예제 #2
0
def TwoAverages(ctx):

    ctx.volumeStep = 30

    alpha_slow = 0.015
    alpha_fast = 0.15

    linear_signal = math.RandomWalk(initialValue=200,
                                    deltaDistr=const(-1),
                                    name="200-t")

    demo = ctx.addGraph('demo')
    myVolume = lambda: [(trader.Position(), demo)]

    return [
        ctx.makeTrader_A(
            strategy.LiquidityProvider(
                event.Every(constant(1.)),
                order.side_price.Limit(volume=const(10))), "liquidity"),
        ctx.makeTrader_A(
            strategy.Signal(event.Every(constant(1.)),
                            order.side.Market(volume=const(3)), linear_signal),
            "signal", [(linear_signal, ctx.amount_graph)]),
        ctx.makeTrader_A(
            strategy.CrossingAverages(event.Every(constant(1.)),
                                      order.side.Market(volume=const(1.)),
                                      alpha_slow, alpha_fast), 'avg_ex+',
            myVolume()),
        ctx.makeTrader_A(
            strategy.CrossingAverages(event.Every(constant(1.)),
                                      order.side.Market(volume=const(1.)),
                                      alpha_fast, alpha_slow), 'avg_ex-',
            myVolume()),
    ]
예제 #3
0
def TrendFollower(ctx):

    V = 1
    alpha = 0.015
    ctx.volumeStep = 30

    linear_signal = math.RandomWalk(initialValue=200,
                                    deltaDistr=const(-1),
                                    name="200-t")

    demo = ctx.addGraph('demo')
    myVolume = lambda: [(orderbook.OfTrader().MidPrice, demo),
                        (trader.Position(), demo),
                        (orderbook.OfTrader().MidPrice.EW().Avg.OnEveryDt(1),
                         demo)]

    return [
        ctx.makeTrader_A(strategy.price.LiquidityProvider().Strategy(
            orderFactory=order.side_price.Limit(
                volume=constant(V * 8)).sideprice_WithExpiry(constant(100))),
                         label="liquidity"),
        ctx.makeTrader_A(
            strategy.side.Signal(linear_signal).Strategy(
                event.Every(constant(1.)), order.side.Market(const(V * 3))),
            "signal", [(linear_signal, ctx.amount_graph)]),
        ctx.makeTrader_A(
            strategy.side.TrendFollower(alpha).Strategy(
                event.Every(constant(1.)), order.side.Market(volume=const(V))),
            "trendfollower_ex", myVolume()),
    ]
예제 #4
0
def MeanReversion(ctx):

    ctx.volumeStep = 40

    alpha = 0.015
    V = 1
    linear_signal = math.RandomWalk(initialValue=200,
                                    deltaDistr=constant(-1),
                                    name="200-t")

    demo = ctx.addGraph('demo')
    myVolume = lambda: [(trader.Position() / 3, demo),
                        (orderbook.OfTrader().MidPrice.EW(alpha).Avg.OnEveryDt(
                            1), demo),
                        (orderbook.OfTrader().Asks.BestPrice, demo),
                        (orderbook.OfTrader().Bids.BestPrice, demo)]

    return [
        ctx.makeTrader_A(strategy.price.LiquidityProvider(
            initialValue=30.).Strategy(orderFactory=order.side_price.Limit(
                volume=constant(V * 20)).sideprice_WithExpiry(constant(10))),
                         label="liquidity"),
        ctx.makeTrader_A(
            strategy.side.Noise().Strategy(
                event.Every(constant(1.)),
                order.side.Market(volume=constant(V * 3))), "signal",
            [(linear_signal, ctx.amount_graph)]),
        ctx.makeTrader_A(
            strategy.side.MeanReversion(alpha).Strategy(
                event.Every(constant(1.)),
                order.side.Market(volume=constant(V))), "meanreversion_ex",
            myVolume()),
    ]
def MeanReversion(ctx):

    ctx.volumeStep = 40

    alpha = 0.015
    V = 1
    linear_signal = math.RandomWalk(initialValue=200,
                                    deltaDistr=constant(-1),
                                    name="200-t")

    demo = ctx.addGraph('demo')
    myVolume = lambda: [(trader.Position(), demo)]

    return [
        ctx.makeTrader_A(strategy.LiquidityProvider(
            orderFactory=order.side_price.WithExpiry(
                constant(10), order.side_price.Limit(volume=constant(V *
                                                                     20)))),
                         label="liquidity"),
        ctx.makeTrader_A(
            strategy.Signal(event.Every(constant(1.)),
                            order.side.Market(volume=constant(V * 3)),
                            linear_signal), "signal",
            [(linear_signal, ctx.amount_graph)]),
        ctx.makeTrader_A(
            strategy.MeanReversion(event.Every(constant(1.)),
                                   order.side.Market(volume=constant(V)),
                                   alpha), "meanreversion_ex", myVolume()),
    ]
예제 #6
0
def Ladder(ctx):

    const = constant
    linear_signal = math.RandomWalk(initialValue=10,
                                    deltaDistr=const(-.1),
                                    name="20-0.1t")

    return [
        ctx.makeTrader_A(
            strategy.price.LiquidityProvider().Strategy(
                orderFactory=order.side_price.Limit(
                    volume=const(10.)).sideprice_WithExpiry(const(50.))),
            "liquidity"),
        ctx.makeTrader_A(
            order.side_price.Limit(volume=const(1.))
            #                .sideprice_Iceberg(lotSize=const(1))
            .LadderMM(initialSize=10).LadderBalancer(maximalSize=10).StopLoss(
                lossFactor=constant(0.03)).Suspend(CurrentTime() < 30).Suspend(
                    (300 < CurrentTime()).And(CurrentTime() < 350)),
            "ladder mm"),
        ctx.makeTrader_A(
            strategy.side.Signal(linear_signal).Strategy(
                event.Every(constant(1.)), order.side.Market(const(4))),
            "signal"),
    ]
예제 #7
0
def Signal(ctx):

    const = constant
    linear_signal = math.RandomWalk(initialValue=20,
                                    deltaDistr=const(-.1),
                                    name="20-0.1t")

    return [
        ctx.makeTrader_A(
            strategy.price.LiquidityProvider().Strategy(
                event.Every(constant(1.)),
                order.side_price.Limit(volume=const(5))), "liquidity"),
        ctx.makeTrader_A(
            strategy.side.Signal(linear_signal).Strategy(
                event.Every(constant(1.)), order.side.Market(const(1))),
            "signal"),
    ]
예제 #8
0
def Dependency(ctx):

    V = 1
    alpha = 0.015
    ctx.volumeStep = 30
    const = constant

    linear_signal = math.RandomWalk(initialValue=200,
                                      deltaDistr=const(-1),
                                      name="200-t")

    demo = ctx.addGraph('demo')
    myVolume = lambda: [(orderbook.OfTrader().MidPrice, demo),
                        (trader.Position(), demo),
                        (orderbook.OfTrader().MidPrice.EW().Avg.OnEveryDt(1), demo)]

    return [
            ctx.makeTrader_A(
                strategy.price.LiquidityProvider(100.)
                              .Strategy(orderFactory =
                                            order.side_price.Limit(volume=constant(V*8)).sideprice_WithExpiry(constant(100))),
                             label="liquidity"),

            ctx.makeTrader_B(
                strategy.price.LiquidityProvider(200.)
                              .Strategy(orderFactory =
                                            order.side_price.Limit(volume=constant(V*8)).sideprice_WithExpiry(constant(100))),
                             label="liquidity B"),

            ctx.makeTrader_A(strategy.side.Signal(linear_signal)
                                          .Strategy(event.Every(constant(1.)),
                                                    order.side.Market(const(V*3))),
                            "signal",
                            [
                             (linear_signal, ctx.amount_graph),
                            ]),

            ctx.makeTrader_B(
                strategy.side.PairTrading(
                    ctx.book_A,
                    factor=2.
                ).Strategy(event.Every(constant(1.)),
                           order.side.Market(const(V*5))),
                "B dependent on A ex"),
    ]
예제 #9
0
def RSI(ctx):

    const = constant
    linear_signal = math.RandomWalk(initialValue=20,
                                    deltaDistr=const(-.1),
                                    name="20-0.1t")

    one = const(1)

    threshold = 30

    demo = ctx.addGraph('demo')
    myVolume = lambda: [(trader.Position(), demo)]

    alpha = 1. / 14

    myRsiBis = lambda: [(orderbook.OfTrader().RSI(1, alpha).OnEveryDt(1), demo)
                        ]

    return [
        ctx.makeTrader_A(
            strategy.LiquidityProvider(
                event.Every(constant(1.)),
                order.side_price.Limit(volume=const(4))), "liquidity"),
        ctx.makeTrader_A(
            strategy.Signal(event.Every(constant(1.)), order.side.Market(),
                            linear_signal), "signal",
            [(linear_signal, ctx.amount_graph)]),
        ctx.makeTrader_A(
            strategy.RSI_linear(order.signedVolume.MarketSigned(),
                                alpha=alpha,
                                timeframe=1), "rsi_linear", myVolume()),
        ctx.makeTrader_A(
            strategy.RSIbis(event.Every(constant(1.)),
                            order.side.Market(one),
                            alpha=alpha,
                            timeframe=1,
                            threshold=threshold), "rsi_bis",
            myVolume() + myRsiBis()),
    ]
예제 #10
0
def TradeIfProfitable(ctx):

    ctx.volumeStep = 30

    slow_alpha = 0.015
    fast_alpha = 0.15

    linear_signal = math.RandomWalk(initialValue=200,
                                    deltaDistr=constant(-1),
                                    name="200-t")

    demo = ctx.addGraph('demo')
    myVolume = lambda: [(trader.Position(), demo)]
    myAverage = lambda alpha: [(orderbook.OfTrader().MidPrice.EW_Avg(alpha).
                                OnEveryDt(1), demo)]

    def cross(alpha1, alpha2):
        return strategy.CrossingAverages(
            event.Every(constant(1.)), order.side.Market(volume=constant(1.)),
            alpha1, alpha2)

    avg_plus_virt = strategy.TradeIfProfitable(
        cross(slow_alpha, fast_alpha), strategy.account.virtualMarket())
    avg_minus_virt = strategy.TradeIfProfitable(
        cross(fast_alpha, slow_alpha), strategy.account.virtualMarket())

    avg_plus_real = strategy.TradeIfProfitable(cross(slow_alpha, fast_alpha),
                                               strategy.account.real())
    avg_minus_real = strategy.TradeIfProfitable(cross(fast_alpha, slow_alpha),
                                                strategy.account.real())

    return [
        ctx.makeTrader_A(
            strategy.LiquidityProvider(orderFactory=order.side_price.Limit(
                volume=constant(45))), "liquidity"),
        ctx.makeTrader_A(
            strategy.Signal(event.Every(constant(1.)),
                            order.side.Market(volume=constant(20)),
                            linear_signal), "signal",
            [(linear_signal, ctx.amount_graph)]),
        ctx.makeTrader_A(
            cross(slow_alpha, fast_alpha), 'avg+',
            myAverage(slow_alpha) + myAverage(fast_alpha) + myVolume()),
        ctx.makeTrader_A(cross(fast_alpha, slow_alpha), 'avg-', myVolume()),
        ctx.makeTrader_A(avg_plus_virt, 'avg+ virt', myVolume()),
        ctx.makeTrader_A(avg_minus_virt, 'avg- virt', myVolume()),
        ctx.makeTrader_A(avg_plus_real, 'avg+ real', myVolume()),
        ctx.makeTrader_A(avg_minus_real, 'avg- real', myVolume()),
    ]
예제 #11
0
def ChooseTheBest(ctx):

    ctx.volumeStep = 30

    slow_alpha = 0.015
    fast_alpha = 0.15

    linear_signal = math.RandomWalk(initialValue=200,
                                    deltaDistr=constant(-1),
                                    name="200-t")

    demo = ctx.addGraph('demo')
    myVolume = lambda: [(trader.Position(), demo)]
    myAverage = lambda alpha: [(orderbook.OfTrader().MidPrice.EW(alpha).Avg.
                                OnEveryDt(1), demo)]

    def cross(alpha1, alpha2):
        return strategy.side.CrossingAverages(alpha1, alpha2)\
                            .Strategy(event.Every(constant(1.)),
                                      order.side.Market(volume = constant(1.)))

    def strategies():
        return [cross(slow_alpha, fast_alpha), cross(fast_alpha, slow_alpha)]

    return [
        ctx.makeTrader_A(
            strategy.price.LiquidityProvider().Strategy(
                orderFactory=order.side_price.Limit(volume=constant(45))),
            "liquidity"),
        ctx.makeTrader_A(
            strategy.side.Signal(linear_signal).Strategy(
                event.Every(constant(1.)),
                order.side.Market(volume=constant(20))), "signal",
            [(linear_signal, ctx.amount_graph)]),
        ctx.makeTrader_A(
            cross(slow_alpha, fast_alpha), 'avg+',
            myAverage(slow_alpha) + myAverage(fast_alpha) + myVolume()),
        ctx.makeTrader_A(cross(fast_alpha, slow_alpha), 'avg-', myVolume()),
        ctx.makeTrader_A(
            strategy.ChooseTheBest(strategies(),
                                   strategy.account.virtualMarket()),
            'best virt', myVolume()),
        ctx.makeTrader_A(
            strategy.ChooseTheBest(strategies(), strategy.account.real()),
            'best real', myVolume()),
    ]
예제 #12
0
def FundamentalValue(ctx):

    ctx.volumeStep = 30
    fv = 200

    demo = ctx.addGraph('demo')
    myVolume = lambda: [(trader.Position(), demo),
                        (const(200.).OnEveryDt(100), demo),
                        (orderbook.OfTrader().Asks.BestPrice, demo),
                        (orderbook.OfTrader().Bids.BestPrice, demo)]

    return [
        ctx.makeTrader_A(
            strategy.price.LiquidityProvider().Strategy(
                orderFactory=order.side_price.Limit(
                    volume=const(6.)).sideprice_WithExpiry(const(100.))),
            "liquidity"),
        ctx.makeTrader_A(
            strategy.side.FundamentalValue(const(fv)).Strategy(
                event.Every(const(1.)), order.side.Market(volume=const(1.))),
            "fv_200", myVolume()),
    ]
예제 #13
0
def FundamentalValue(ctx):
    
    ctx.volumeStep = 30
    fv = 200

    demo = ctx.addGraph('demo')
    myVolume = lambda: [(trader.Position(), demo)]
    myPrice = lambda: [(orderbook.MidPrice(), demo)]

    return [
        ctx.makeTrader_A( 
            strategy.LiquidityProvider(
                        orderFactory = order.side_price.WithExpiry(const(10),
                            order.side_price.Limit(volume=const(6)))),
            "liquidity"),
    
        ctx.makeTrader_A(
             strategy.FundamentalValue(
                event.Every(const(1.)),
                order.side.Market(volume = const(1.)),
                const(fv)),
            "fv_200",
            myVolume()),
    ]
 def fv(x):
     return strategy.FundamentalValue(
         event.Every(constant(1.)),
         order.side.Market(volume=constant(1.)),
         fundamentalValue=const(x))
예제 #15
0
def Complete(ctx):
    
    ctx.volumeStep = 100

    c_200 = const(200.)
    
    fv_200_12 = strategy.side.FundamentalValue(c_200).Strategy(orderFactory=order.side.Market(volume=const(12)))

    fv_200 = strategy.side.FundamentalValue(c_200).Strategy(orderFactory=order.side.Market(volume=const(1)))
     
    def s_fv(fv):
        return strategy.TradeIfProfitable(
            strategy.side.FundamentalValue(const(fv)).Strategy(orderFactory=order.side.Market(volume=const(1))))

    def fv_virtual(fv):
        return ctx.makeTrader_A(s_fv(fv), "v" + str(fv))
        
    
    return [
            ctx.makeTrader_A( 
                    strategy.price.LiquidityProvider()
                                  .Strategy(orderFactory =
                                                order.side_price.Limit(volume=constant(170))
                                                     .sideprice_WithExpiry(constant(10))),
                      "liquidity"),
            
    
            ctx.makeTrader_A(fv_200_12, "t200"),    
            ctx.makeTrader_A(fv_200, "t200_1"),

            ctx.makeTrader_A(strategy.side.FundamentalValue(const(150.))
                                          .Strategy(event.Every(constant(1.)),
                                                    order.side.Market(const(1.))),
                             "t150"),
            
            ctx.makeTrader_A(strategy.side.MeanReversion().Strategy(event.Every(constant(1.)),
                                                                    order.side.Market(const(1.))),
                             "mr_0_15"),
    
            ctx.makeTrader_A(strategy.side.CrossingAverages(alpha_1=0.15,
                                                            alpha_2=0.015)
                                          .Strategy(event.Every(constant(1.)),
                                                    order.side.Market(const(1.))),
                             label="avg+"),

            ctx.makeTrader_A(strategy.side.CrossingAverages(alpha_1=0.015,
                                                            alpha_2=0.15)
                                          .Strategy(event.Every(constant(1.)),
                                                    order.side.Market(const(1.))),
                             label="avg-"),
    
            ctx.makeTrader_A(strategy.TradeIfProfitable(fv_200),
                             "v_fv200"),
            
            fv_virtual(160.),
            fv_virtual(170.),
            fv_virtual(180.),
            fv_virtual(190.),
    
            ctx.makeTrader_A(strategy.ChooseTheBest([
                                               s_fv(160.),
                                               s_fv(170.),
                                               s_fv(180.),
                                               s_fv(190.), 
                                               ]),
                             "best")
    ]     
 def cross(alpha1, alpha2):
     return strategy.CrossingAverages(
         event.Every(constant(1.)), order.side.Market(volume=constant(1.)),
         alpha1, alpha2)
예제 #17
0
def Orders(ctx):

    linear_signal = math.RandomWalk(initialValue=20,
                                    deltaDistr=const(-.1),
                                    name="20-0.1t")

    midPrice = orderbook.MidPrice(ctx.book_A)
    return [
        ctx.makeTrader_A(
            strategy.price.LiquidityProvider().Strategy(
                event.Every(const(1.)),
                order.side_price.Limit(volume=const(35))), "liquidity"),
        ctx.makeTrader_A(
            strategy.price.LiquidityProvider().Strategy(
                event.Every(const(100.)),
                order.side_price.Limit(volume=const(5)).sideprice_StopLoss(
                    const(0.1))), "liquidity stoploss"),
        ctx.makeTrader_A(
            strategy.price.LiquidityProvider().Strategy(
                event.Every(const(10.)),
                order.side_price.Limit(volume=const(5)).sideprice_Iceberg(
                    const(1))), "liquidity iceberg"),
        ctx.makeTrader_A(
            strategy.price.LiquidityProvider().Strategy(
                event.Every(const(10.)),
                order.side_price.Limit(volume=const(5)).sideprice_WithExpiry(
                    const(5))), "liquidity expiry"),
        ctx.makeTrader_A(
            strategy.price.LiquidityProvider().Strategy(
                event.Every(const(10.)),
                order.side_price.Limit(volume=const(15)).sideprice_Iceberg(
                    const(1)).sideprice_WithExpiry(const(5))),
            "liquidity iceberg expiry"),
        ctx.makeTrader_A(
            strategy.side.Signal(linear_signal).Strategy(
                event.Every(const(1.)), order.side.Market(volume=const(1))),
            "signal market"),
        ctx.makeTrader_A(
            strategy.side.Signal(linear_signal).Strategy(
                event.Every(const(1.)),
                order.side.price.Limit(const(1)).side_FloatingPrice(
                    const(100))), "signal floating"),
        ctx.makeTrader_A(
            strategy.side.Signal(linear_signal).Strategy(
                event.Every(const(1.)),
                order.side.Limit(const(110), const(3)).side_Iceberg(const(1))),
            "signal iceberg"),
        ctx.makeTrader_A(
            strategy.side.Signal(linear_signal).Strategy(
                event.Every(const(1.)),
                order.side.Limit(const(120), const(1)).side_ImmediateOrCancel),
            "signal ioc"),
        ctx.makeTrader_A(
            strategy.side.Signal(linear_signal).Strategy(
                event.Every(const(10.)),
                order.side.price.Limit(const(1)).side_Peg), "signal peg"),
        ctx.makeTrader_A(
            strategy.side.Signal(linear_signal).Strategy(
                event.Every(const(1.)),
                order.side.Market(volume=const(1)).side_StopLoss(const(0.1))),
            "signal stoploss"),
        ctx.makeTrader_A(
            strategy.side.Signal(linear_signal).Strategy(
                event.Every(const(10.)),
                order.side.Limit(price=midPrice, volume=const(1))),
            "signal limit"),
        ctx.makeTrader_A(
            strategy.side.Signal(Interlacing()).Strategy(
                event.Every(const(10)),
                order.side.Limit(price=const(120), volume=const(1))),
            "noise limit"),
        ctx.makeTrader_A(
            strategy.side.Signal(Interlacing()).Strategy(
                event.Every(const(10)),
                order.side.Limit(price=const(120),
                                 volume=const(1)).side_WithExpiry(const(10))),
            "noise expiry"),
        ctx.makeTrader_A(
            strategy.side.Signal(Interlacing()).Strategy(
                event.Every(const(10.)),
                order.side.price.Limit(const(1)).side_Peg.side_Iceberg(
                    const(1))), "iceberg peg"),
        ctx.makeTrader_A(
            strategy.side.Signal(Interlacing()).Strategy(
                event.Every(const(10.)),
                order.side.price.Limit(const(3)).side_price_Iceberg(
                    const(1)).side_Peg), "peg iceberg"),
        ctx.makeTrader_A(
            strategy.side.Signal(Interlacing()).Strategy(
                event.Every(constant(3.)),
                order.side.price.Limit(const(3)).side_price_Iceberg(
                    const(1)).side_Peg.side_WithExpiry(const(3))),
            "peg iceberg expiry"),
        ctx.makeTrader_A(
            strategy.side.Signal(Interlacing()).Strategy(
                event.Every(constant(10.)),
                order.side.price.Limit(const(1)).side_Peg.side_Iceberg(
                    const(1)).side_WithExpiry(const(10.))),
            "iceberg peg expiry"),
    ]
def MultiarmedBandit(ctx):

    ctx.volumeStep = 30

    demo = ctx.addGraph('demo')
    myVolume = lambda: [(trader.Position(), demo)]

    def fv(x):
        return strategy.FundamentalValue(
            event.Every(constant(1.)),
            order.side.Market(volume=constant(1.)),
            fundamentalValue=const(x))

    xs = range(100, 300, 50) + range(160, 190, 10)

    def strategies():
        return map(fv, xs)

    def fv_traders():
        return [ctx.makeTrader_A(fv(x), "fv" + str(x), myVolume()) for x in xs]

    return [
        ctx.makeTrader_A(
            strategy.LiquidityProvider(orderFactory=order.side_price.Limit(
                volume=constant(45))), "liquidity"),
        ctx.makeTrader_A(
            strategy.FundamentalValue(event.Every(constant(1.)),
                                      order.side.Market(volume=constant(12.)),
                                      fundamentalValue=const(200)),
            'fv 12-200'),
        ctx.makeTrader_A(
            strategy.MultiArmedBandit(
                strategies(), strategy.account.virtualMarket(),
                strategy.weight.efficiencyTrend()), 'virt trend', myVolume()),
        ctx.makeTrader_A(
            strategy.MultiArmedBandit(strategies(), strategy.account.real(),
                                      strategy.weight.efficiencyTrend()),
            'real trend', myVolume()),
        ctx.makeTrader_A(
            strategy.MultiArmedBandit(
                strategies(), strategy.account.virtualMarket(),
                strategy.weight.efficiency()), 'virt efficiency', myVolume()),
        ctx.makeTrader_A(
            strategy.MultiArmedBandit(strategies(), strategy.account.real(),
                                      strategy.weight.efficiency()),
            'real efficiency', myVolume()),
        ctx.makeTrader_A(
            strategy.MultiArmedBandit(
                strategies(), strategy.account.virtualMarket(),
                strategy.weight.score(), strategy.weight.atanPow()),
            'virt score', myVolume()),
        ctx.makeTrader_A(
            strategy.MultiArmedBandit(
                strategies(), strategy.account.real(), strategy.weight.score(),
                strategy.weight.clamp0()), 'real score', myVolume()),
        ctx.makeTrader_A(
            strategy.MultiArmedBandit(
                strategies(), strategy.account.virtualMarket(),
                strategy.weight.efficiencyTrend(), strategy.weight.identityF(),
                strategy.weight.chooseTheBest()), 'virt best', myVolume()),
        ctx.makeTrader_A(
            strategy.MultiArmedBandit(
                strategies(), strategy.account.real(), strategy.weight.unit(),
                strategy.weight.identityF()), 'uniform', myVolume()),
    ] + fv_traders()