Qlib is an AI-oriented quantitative investment platform that aims to realize the potential, empower research, and create value using AI technologies in quantitative investment, from exploring ideas to implementing productions. Qlib supports diverse machine learning modeling paradigms. including supervised learning, market dynamics modeling, and RL.
I'm currently using the following code for testing over US data, I have a question about trading cost. Based on what I've learned, US market has different rule of trading cost compared to Chinese market. US market's trading cost is based on share, while Chinese market's trading cost is based on trading value, so I wonder how to set the trading cost if I'm going to test on US market. Thanks!
`from pprint import pprint
import qlib
import pandas as pd
from qlib.utils.time import Freq
from qlib.utils import flatten_dict
from qlib.backtest import backtest, executor
from qlib.contrib.evaluate import risk_analysis
from qlib.contrib.strategy import TopkDropoutStrategy
I'm currently using the following code for testing over US data, I have a question about trading cost. Based on what I've learned, US market has different rule of trading cost compared to Chinese market. US market's trading cost is based on share, while Chinese market's trading cost is based on trading value, so I wonder how to set the trading cost if I'm going to test on US market. Thanks! `from pprint import pprint
import qlib import pandas as pd from qlib.utils.time import Freq from qlib.utils import flatten_dict from qlib.backtest import backtest, executor from qlib.contrib.evaluate import risk_analysis from qlib.contrib.strategy import TopkDropoutStrategy
if name == "main":
`