搬砖到python
搬砖到python
这个作者很懒,什么都没留下…
展开
-
相对活力指数指标(RVI)指标模拟量化交易(第二版)
经过一段时间的测试,在第一版代码的基础上做了不少修改原创 2021-10-04 21:41:23 · 808 阅读 · 0 评论 -
相对活力指数指标(RVI)量化交易
背景:在经过一段时间对backtrader的学习之后,将用于回测的backtrader模型进行修改,增加了实盘模拟的功能。原创 2021-09-15 00:04:29 · 836 阅读 · 0 评论 -
python pip中的Fatal error in launcher错误及解决
背景:在https://www.lfd.uci.edu/~gohlke/pythonlibs/上找到TA_Lib包按照我的情况选择TA_Lib-0.4.20-cp37-cp37m-win_amd64.whl下载之后正常的话直接WARNING: Requirement 'TA_Lib-0.4.20-cp37-cp37m-win_amd64.whl' looks like a filename, but the file does not existERROR: TA_Lib-0.4.原创 2021-07-11 22:49:12 · 4467 阅读 · 0 评论 -
Pandas 中 SettingwithCopyWarning的错误
源代码:date = pd.read_csv('交易模拟测试.csv', encoding='utf-8')date_old = date.iloc[-1, :]if date_old['symbol'] != 'usdt': symbol = date_old['symbol'] date_old['symbol'] = symbol.replace('usdt', '')错误内容:SettingWithCopyWarning: A value is trying t原创 2021-04-20 23:06:15 · 60 阅读 · 0 评论 -
简单回测-api使用
还在学习python中,这次用api提取数据并进行简单的策略回测,代码还在优化中。。。原创 2021-04-20 23:02:35 · 671 阅读 · 3 评论 -
pyinstaller与pynput的问题
背景:用pyinstaller打包,其中用到了pynput的包。现象:运行打包之后的脚本的时候出现了下面的问题,而且pynput是1.7.2的结论:把pynput的1.7.2 退回到1.6.8,再打包就好使了或者使用命令 pip install pynput==1.6.8具体原因还没查到,如果查到了以后会添加上。附录:pynput的1.6.8https://pan.baidu.com/s/179hGzZuRhjikS1VWRWM2R4VTeWckNWMwZf1W==?原创 2021-04-20 23:00:57 · 580 阅读 · 0 评论 -
pyinstaller安装及使用
安装pyinstaller:参考:https://blog.csdn.net/wardseptember/article/details/79965836?utm_medium=distribute.pc_relevant_download.none-task-blog-BlogCommendFromBaidu-1.nonecase&depth_1-utm_source=distribute.pc_relevant_download.none-task-blog-BlogCommendFro原创 2021-04-20 22:55:13 · 726 阅读 · 1 评论 -
logging使用
方便省事先直接上代码了import logginglogger = logging.getLogger()logger.setLevel(level=http://logging.INFO)handler = logging.FileHandler('ServerLog.txt',encoding='utf-8',mode='a')formatter = logging.Formatter('%(asctime)s - %(levelname)s - %(lineno)d - %(messa原创 2021-04-20 22:46:46 · 85 阅读 · 0 评论