Rico358097990

Results 24 comments of Rico358097990

@jLynx Do you have any solution?

每天晚上获取当天基金净值的时候会有数据更新不及时的情况 比如:xa.fundinfo("320007",priceonly=True).price 或者 xa.universal.get_daily("F320007") 清除缓存也不行 xa.universal.reset_cache()

谢谢大佬回复,还有个问题想问下,交易记录必须从csv文件中获取吗?可以从sql中获取不? 参考你的例子 read = xa.record(path) xa.mul(status=read.status) 不行的话我就从sql中导出为csv

大佬,我的想法是在每天3点前根据策略自动买入卖出,但是我有些困惑: 基金策略回测是根据历史当天净值来回测,但实际情况是每天我能参考的只有估值,而且xa.get_rt()好像不能直接获取到每天估值 我应该怎么实施策略?

@willzhqiang 没有现成接口,但是可以从app入手。模拟点击或者hook

@refraction-ray fundinfo.price现在数据只到12-31了,怎么获取历史净值啊

大佬,在尝试本地化的时候出现一个error,这个sqlite是django生成的 ``` basedir = os.path.abspath(os.getcwd()) sqlPath ='sqlite:////' + os.path.join(basedir, 'db.sqlite3') engine = create_engine(sqlPath) io = {"save": True, "fetch": True, "form": "sql", "path": engine} sysopen = xa.mul(status=read.status, **io) ``` 运行时报了 ```...

附上完整调用栈 ``` Traceback (most recent call last): File "/Users/mac/opt/anaconda3/envs/django/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context self.dialect.do_execute( File "/Users/mac/opt/anaconda3/envs/django/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 609, in do_execute cursor.execute(statement, parameters) sqlite3.OperationalError: near "xa000294": syntax error The above exception...

在Django里面调用fundinfoj.price.to_sql("xa320007", con=engine)这句是可以执行成功的 ![image](https://user-images.githubusercontent.com/16099174/104597212-01d68180-56b0-11eb-9e27-0d2c934efbb9.png) 我仔细看了下报错信息,应该是去取数据的时候结果表里没有数据抛了异常