qlib icon indicating copy to clipboard operation
qlib copied to clipboard

Qlib is an AI-oriented Quant investment platform that aims to use AI tech to empower Quant Research, from exploring ideas to implementing productions. Qlib supports diverse ML modeling paradigms, incl...

Results 431 qlib issues
Sort by recently updated
recently updated
newest added

## 🌟 Feature Description 目前的回测实现中,Postion类是不支持卖空的。在不持有股票的时候,无法发起卖单。 虽然代码中添加了 InfPostion类,接触了这个限制。但是各种update逻辑基本没有实现。 但是,在实际上的股票/期权等金融资产交易中,卖空是最常见的实现中性策略的手段之一。不知道为什么团队在早期实现回测模块的时候,只考虑到了买多这种情况。 ## Motivation 希望团队增加对卖空的支持,大大增加Qlib的实用性。 很多成熟的回测框架都支持,这里不再一一列举。 当然可以让每个用户都进行改造,只用Qlib来做模型的预测部分,不使用Qlib的回测。 但是这就意味着,用户只用数据和模型这边部分,从策略的实现(因为一般都跟回测/实盘交易引擎绑定),回测,结果分析都使用其他框架。 如果这样的话,Qlib的价值会大打折扣。 🌟 Feature Description In the current backtesting implementation, the Postion class does not support short...

enhancement

qlib提供的雅虎财经数据,是经过首日收盘价缩放(股票上市第一天收盘价调整为1)的后复权数据。 在回测过程中,使用后复权价进行买卖,会导致账户初始资金cash及最小成本min_cost面值与购买力不一致的问题。 举例: 假设账户初始资金cash = 100000, 股票stock_1的真实收盘价为10,复权之后为100。 如果按照真实收盘价,可以购买10000股,而按照复权价只能购买到1000股。虽然在回测交易过程中,现金和股价都是用后复权价格进行交易,不会存在这个问题,但是账户初始现金没有经过复权因子处理,其面值和购买力显然存在偏差。 另外,最小交易成本min_cost是一个固定值,也会存在类似问题。如代码 trade_cost = max(trade_val * cost_ratio, self.min_cost)

bug

## ❓ Questions and Help I am so confused about whether the data source of open, close, high, and low should be adjusted or not. I found the document saying...

question

## ❓ Questions and Help Getting requirements to build wheel ... done Installing backend dependencies ... error error: subprocess-exited-with-error × pip subprocess to install backend dependencies did not run successfully....

question

You should add a GitHub Actions workflow that allows you to **manually trigger version bumps**. This will help you keep your version and changelog consistent in the project. **Proposed Workflow**...

enhancement

ops计算代码中的下面这个函数不对。应该使用np.nansum(w*x) def weighted_mean(x): w = np.arange(len(x)) + 1 w = w / w.sum() return np.nanmean(w * x)

bug

## ❓ Questions and Help Hello, In my current HFT project I cannot use Qlib’s proprietary `.bin` file format. I already have 1-minute OHLCV data in a pandas DataFrame (fetched...

question

# 🐛 Bug Description The Yahoo data collector (scripts/data_collector/yahoo/collector.py) has multiple critical issues that prevent successful data collection and normalization. These include date parsing errors, deprecated pandas method warnings, type...

bug

## 🌟 Feature Description This issue proposes to contribute a new feature to the Qlib project and subsequently open a pull request for the contribution. The detailed nature of the...

enhancement

目前使用的数据是https://github.com/chenditc/investment_data/releases/latest/download/qlib_bin.tar.gz的数据,并指导解压。挑选了601318和601212的20250701-20250714的日交易数据,跟tushare的数据相差非常大。大家做研究之前,核对过数据情况吗?有没有更加准确的数据源推荐。

question