Closed youbrain closed 4 months ago
I add to actuator my uniswap and deribit markets. And I think I got an error because of price course.
actuator.set_price(deribit_market.get_price_from_data())
# settings
timeframe = [
datetime(2024, 2, 15),
datetime(2024, 2, 20)
]
actuator = Actuator()
broker = actuator.broker
usdt = TokenInfo(name="USDT", decimal=6)
eth = TokenInfo(name="WETH", decimal=18)
uni_market = UniLpMarket(
MarketInfo("uni_market3"),
UniV3Pool(eth, usdt, 0.05, usdt), # declare pool 0.005%
data_path="uniswap_dataset"
)
uni_market.load_data(
ChainType.ethereum.name,
"0x11b815efb8f581194ae79006d24e0d814b7697f6",
timeframe[0], timeframe[1]
)
broker.add_market(uni_market)
broker.set_balance(usdt, 490.994339)
broker.set_balance(eth, 0.11837137182367227)
deribit_market = DeribitOptionMarket(
MarketInfo("option_test"),
DeribitOptionMarket.ETH,
data_path="deribit_orderbook"
)
deribit_market.load_data(
timeframe[0], timeframe[1]
)
broker.add_market(deribit_market)
broker.set_balance(DeribitOptionMarket.ETH, 100)
actuator.strategy = DeribitStrategy(timeframe[0])
actuator.set_price(deribit_market.get_price_from_data())
actuator.run()
Thats my code
Is there any way to run back test with multiple markets at the same time?
Interesting in Deribit+Uniswap v3 pools