当前位置:网站首页>vnpy本地導入csv數據
vnpy本地導入csv數據
2022-04-22 12:53:00 【Lord's Mercy】
操作環境:基於vnpy2.9.0操作
1.觀察對比數據格式
先研究看原csv數據格式,對比vnpy源碼數據導入模塊實體類

注:volume列名是自己改的
vnpy源碼中實體類BarData
./vnpy/
trader/
object.py #所有的類 BarData 第83行

2.導入數據
運行vnpy,進入數據管理模塊,配置相關項

注:紅色部分是需要根據數據格式調整的部分
此時會報錯

是因為數據格式的問題,解决方法:調整下,删除秒,年月日連接線 - 格式調整為 /
之後運行還會報錯,報一個volume的錯,原因是沒有volume,將id列列名修改為volume,參考第一章圖,先繞過去(因為我找的數據本身沒有成交量字段)保證導入成功。
之後等待,導入成功。
3.查看數據
vnpy中可以查看

本地數據庫也可以查看,打開navicat查看,導入成功

下一步:
將本地策略回測跑起來,
後續還是考慮使用mysql或mongodb。
版权声明
本文为[Lord's Mercy]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204221252267777.html
边栏推荐
- The difference between let and VaR
- 线程相关问题
- Ros2 learning notes (8) learn the startup file of ros2 from turnlesim
- Novartis Nebula updated its prospectus and continued its listing process. Is the "academic school" gaining momentum step by step?
- let与var的区别,几个经典的小面试题
- Detailed explanation and code example of serial communication of 51 single chip microcomputer
- Matlab soil mechanics concrete pile number stress calculation program
- 每日一题系列:公共子串计算
- Partagez quelques conseils pratiques que vous avez accumulés sur un projet mobile récemment écrit
- vr全景拍摄需要的器材有哪些?都有什么作用呢?
猜你喜欢

Desai wisdom number - line chart (dynamic line chart): price adjustment of gasoline and diesel in recent 1 year

Under the pressure of sanctions, Russia plans to import electronic products in parallel through friendly countries

百度地图结合vr全景,全景地图模式让你出行更放心

制裁压力下,俄罗斯计划通过友好国家平行进口电子产品

Matlab bridge span combination problem GUI Graphical interface is completed

. net treasure API: outputformatter, format output object

R语言把dataframe拆分为两个或多个dataframe实战(Splitting tables):使用R原生方法、data.table、dplyr等方案

Page d'inscription du projet Bookstore et vérification de la boîte aux lettres

Book city project registration page and email verification

matlab 桥梁中一跨选择合适的跨径组合
随机推荐
Male female pairing
IDE導入項目
R language ggplot2 visualizes the custom sorting of x-axis factor variables instead of sorting in the default alphabetical order
百度地图结合vr全景,全景地图模式让你出行更放心
制裁压力下,俄罗斯计划通过友好国家平行进口电子产品
April 21, 2022 s s s m framework integration @ lesson 1 s s m environment configuration & focus on practical operation. Summary in practice. The results are not shown here.
自己动手写编译器:通过语法编译构建语法树并实现中间代码生成
R语言使用write_xlsx函数导出、写入dataframe数据到excel文件实战
可执行文件的生成过程
Today's sleep quality record 76 points
Will the slice, replace, touppercase and repeat methods of string change the original string
The ABAQUS model of standardized steel box girder is established, and the plug-in of RSG is used for secondary development
JS输出随机数
51单片机之串口通信详解及代码示例
R语言ggplot2可视化X轴因子变量自定义排序,而不是按照默认的字母顺序排序实战
VNC连接Too many security failures
ABAQUS model of local stress of bottom plate and web under the action of steel box girder jacking
MySQL 5.0安装教程图解详细教程
Ros2 learning notes (IX) learn the bag recording of ros2 from turnlesim
Sqlserver游标的使用