市值行业中性化代码,求帮忙更正
%%sql
SELECT
log(total_market_cap) as f_market_cap,
m_avg(turn,20) as f_trun,
date,
instrument,
industry_level1_co
由bqkrin4q创建,最终由small_q更新于
%%sql
SELECT
log(total_market_cap) as f_market_cap,
m_avg(turn,20) as f_trun,
date,
instrument,
industry_level1_co
由bqkrin4q创建,最终由small_q更新于
df = dai.query("""
select date, instrument, rank_pe_ttm,pe_ttm,sw2021_level1
from cn_stock_factors
where date>'2023-01-01'
"
由smartian创建,最终由small_q更新于
如下图,只拿到了全市场3568个数据。
由yjz_quanter创建,最终由small_q更新于
由xskuang创建,最终由small_q更新于
由bq8ispcb创建,最终由small_q更新于
新建可视化空白稳定,粘贴Ai给写的代码后显示
ModuleNotFoundError: No module named 'jqdata'
\
由bqaguid7创建,最终由small_q更新于
自己的表不能读取了,是不是有同时写入导致表坏了?
InvalidInputException: Invalid Input Error: Attempting to execute an unsuccessful or closed pending q
由scolo创建,最终由small_q更新于
# 回测引擎:每日数据处理函数,每天执行一次
def m19_handle_data_bigquant_run(context, data):
#...
# 2. 生成卖出订单
print(f'{today} before cash:{co
由bqn29k3u创建,最终由small_q更新于
由chenyangang97创建,最终由small_q更新于
由bq8ispcb创建,最终由small_q更新于
由bqokm7jy创建,最终由small_q更新于
我根据是视频教学尝试提取数据,但是出现如下报错,有大佬能解答一下吗?第一次使用这个平台,不是很懂:
![](/wiki/api/attachme
由bql0o60m创建,最终由small_q更新于
from bigdatasource.api import DataSource
from bigdata.api.datareader import D
from biglearning.api im
由bqbsomfl创建,最终由small_q更新于
新手求教,左边是常规的处理,右边是因子处理,怎么把m10和m13合并在一起呢
[https://bigquant.com/codeshare/064cb01e-9ac3-47ce-bd5a-d90419ae1390](https://bigquant.com/codeshare/064cb01e-
由bq8ispcb创建,最终由small_q更新于
我有一张表,instrument 后缀为SZA
想要修改后缀为 SZ,执行了下面的代码,却报错了,只能重新覆盖了吗?
![](/wiki/
由scolo创建,最终由small_q更新于
Bigquant的老师你们好,
基础太差了,想咨询以下因子看板里面的因子,能在可视化模块,输入特征列表里直接调用吗?
比如这个arron_down_25,
在输入特征列表里面把它arron_down_25直接标进去好像不行,
我把因子访问里边的 ((25 - ROW_NUMB
由bqddxi6j创建,最终由small_q更新于
小白提问,通过首页QuantChat生成的策略,在 输入特征(DAI SQL)模块 中无法修改任何一个字,即使是注释也不行,只要修改就报错,复制到其他策略编辑里也不行,是什么原因?
![](/wiki/api/attachments.redirect?id=efd81248-7d44-4238-
由bq8ispcb创建,最终由small_q更新于
def bigquant_run(context):
context.set_commission(PerOrder(buy_cost=0.0001, sell_cost=0.0011, min_cost=0))
context.slippage.V
由bq8ispcb创建,最终由small_q更新于
回测中貌似有bug,前一天用context.order_target_percent(instrument,0)卖出的股票,后一天在仓位中还有它的信息,只不过持仓量为0。既然仓位中没有这只股票了,为什么仓位中还有它的信息?
![](/wiki/api/attachments.redirect?i
由bqugjnie创建,最终由small_q更新于
# 交易引擎:bar数据处理函数,每个时间单位执行一次
def m2_handle_data_bigquant_run(context, data):
target_asset = context.instruments[0]
target_percen
由sdpo创建,最终由small_q更新于
这是自带的我的文档/因子分析代码策略.ipynb,我使用这份代码进行简单的快速因子回测。在上周五之前是没问题的,最近无法运行了,提示TypeError: set_global_opts() got an unexpected keyword argument 'tooltip_opts'
。完整
由bqkul07v创建,最终由small_q更新于
通过instruments_CN_STOCK_A获取股票列表,然后再获取股票列表里的代码来获取当天所有的股票历史信息,报错,发现2020-08-24日里面,有一个651002.SHA是无效标的,通过股票软件查询,查询不到该股票信息,是不是数据里面有错误?
由air200110创建,最终由small_q更新于
由bq30zy4n创建,最终由small_q更新于
这个策略怎么提交模拟不出信号?是因为使用了未来信息导致未来1天的数据取值是nan值所以最好运行成功,但是没有信号?
由cuex创建,最终由small_q更新于
执行不报错,但是提交任务报错。麻烦工程师小哥看一下什么问题 ?
[https://bigquant.com/codeshare/222f36b9-2f22-48aa-88b6-04d9791ec1d7](https://bigquant.com/codeshare/222f36b9-2f22-48
由lstm666666创建,最终由small_q更新于