自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(85)
  • 收藏
  • 关注

原创 使用tensorflow:LSTM神经网络预测股票(三)

原始数据处理有朋友在qq群里分享了原始数据处理的想法,例如调整origin_data_row参数、添加一些大盘的数据作为新的特征等。所以这一篇我将原始数据以及原始数据的处理方法写下来,为方便大家验证、探索更好地解决方案。原始数据格式原始数据共有11列, 列名为: stock_num,stock_date,cir_market_value,close_hfq,high_hfq,low_hfq,op

2017-10-15 15:13:35 17281 2

原创 千投量化体验:平台介绍篇

千投量化是什么它是国内一家做股票量化分析建模的网站,官网地址戳这里。做量化的网站主体功能大致都是:用户给定指标、平台运行回测,返回回测产生的报告,该平台亦如是。平台最大的特点是构建指标不需要任何编程技巧,只需要在网页上单击并填充自己喜欢的参数即可。并且平台指标的组合自由度非常高,这也是我使用它的一个重要原因。 构建指标的过程有点儿像电商的模式:平台涵盖大量指标(提供大量商品并附带搜索功能),单击

2017-10-13 16:30:29 1883

原创 千投量化体验:采用均线加风控建模(三)

验证结果上一篇中的智能回测已经跑完,最好的结果如下:将回测区间拉长后,确实使得整体回撤降了下来,近5年的情况也得到了一定的缓解。但是回报率还是有点低,11年13倍仍然没有达到心中的预期(因为资金量不大,翻10倍其实也没多少…),但是它其实已经达到了可以实盘测试的水平。通过给模型加上千分之2的压力(创建模型页面,右侧的“模型压力费率”参数),使得每次买卖先亏损千分之二。重新回测,结果如图所示: 加上

2017-10-13 15:37:33 972

原创 千投量化体验:采用均线加风控建模(二)

改进点上一篇 决定更换回测区间并查看历史选股记录。实践后发现效果很一般,主要体验为:更换回测区间仍然可能拟合于一段特定的行情,需要反复验证和实践;查看历史选股记录工作量有点大,需要一个一个寻找到对应时间去查看,而仅查看一部分很有可能会招致误判。所以还是继续按照昨天的套路,继续加一些指标,探索如何让模型应对温水煮青蛙式的行情。探索过程第一次摸索,我加上了两个与总涨跌幅相关的入市指标,智能回测后,发现效

2017-10-13 15:10:42 1336

原创 千投量化体验:采用均线加风控建模(一)

创建模型思路我比较倾向于均线趋势型的模型,因而一开始模型探索主要以均线类指标为主,其他指标辅助:我添加了3个均线突破的入市指标,添加了3个均线突破的出市指标,以及3个趋势型风控,每种类型的指标组合方式都为 (A 或者 B) 并 C,二次筛选函数为”流通市值越低越容易被选中”,智能回测区间最终定在2007-01-09至2009-03-24。原因为这段区间内涵盖了一个超级大牛市和一个大熊市以及区间尾部一

2017-10-13 14:33:37 1750

原创 建模所使用的工具

编程语言:python,主要使用pandas、numpy包数据来源:爬虫、tushare财经数据源、某宝算法:主要使用遗传算法作为数据挖掘的主要手段平台:千投量化,主要使用它提供的智能回测手段,探索原始指标组合及优化方向。

2017-10-13 14:22:33 630

原创 实现二维数组排序

最近在研究粗糙集、遗传算法、人工神经网络。在遗传网络计算适应性分数上,需要建立索引,要对二维数组排序。刚刚开始还感觉无从下手,最后应用c++库函数qsort轻松解决。Ps:给大家推荐一个遗传算法和人工神经网络入门的书:《游戏编程中的人工智能技术》这门书里面关于神经网络和遗传算法的介绍,确实不错。#include #include #include using namespace

2017-10-13 14:22:30 744

原创 c++重载运算符

#includeusing namespace std;classfun    //复数加法 减法 乘法 除法的类(函数重载){public: fun() {real=0;imag=0;} fun(double r,double i) {  real=r;  imag=i; } friend fun operator +(fun &,fun&); friend fu

2017-10-13 14:22:27 457

原创 计算带括号的数值表达式

题目:输入一串数值算术表达式( 如:34+5-(8+4)*6 ) ,计算机编程实现对该表达式的树形存储(即:去除括号),并输出表达式的结构树和相应的前缀表达式和后缀表达式,以及完成求值运算。算法:共分为5个文件,4个头文件,一个主函数.“jiedian.h” #includeusing namespace std;const int MAX=100;//最大节点数c

2017-10-13 14:22:24 2621

原创 狼找兔子问题

题目:狼找兔子问题:一座山周围有n个洞,顺时针编号为0,1,2,3,4,…,n-1。一只狼从0号洞开始,顺时针方向计数,每当经过第m个洞时,就进洞找兔子。输入m,n。试问兔子有没有幸免的机会?如果有该藏在哪儿?算法:#include#includeusing namespace std;bool a[9999999];int main(){i

2017-10-13 14:22:21 5477

原创 给出5个数字,前4个数字做四则运算…

#include#includeusing namespace std;char fuhao[4]={'+','-','*','/'};bool caculate(int f[3],double shuzi[5]);int main(){ int i,j,k; double shuzi[5]; int f[3]; while(1) {  cout  bool flag=

2017-10-13 14:22:18 670

原创 哈夫曼算法

#includeusing namespace std;//Haffman树的创建//给出几个字母,以及相应出现频率或者是频数,程序计算给出Haffman编码struct Haffman//构造节点结构{bool ifvalue;//该节点是否对应输入的字母char s;//如果是输入字母的节点,s保存字母,否则置空int num;//保存节点权值bool gen;//是否是根结

2017-10-13 14:22:15 545

原创 二分法求解方程解

求解sin(x)=9*x*x-1 x在规定精度下的解#include#includeusing namespace std;double JD=0.00001;//精度初始化double save;//用于判断是否达到精度要求int num_count;//用来保存二分次数double fun(double left,double right)//当x取0时,sinx=9*x*x-1

2017-10-13 14:22:13 1264

原创 C语言一个简单的贪吃蛇程序

这是很早以前写的.好像还是有问题,"食物"的出现有可能跟墙壁重叠,懒得改啦#include#include#include#include#includeusing namespace std;const int HALL=20;const int LEVEL=300;const char T='#';char hall[HALL][HALL]={' '};//墙壁bool

2017-10-13 14:22:10 1584

原创 Prime Palindromes

分析:能力有限,最后一组数据总是超时,没办法。。只好猥琐一下了。。。代码如下:#include #include #include using namespace std;int p[10000]={5,7,11,101,131,151,181,191,313,353,373,383,727, 757,787,797,919,929,10301,10501,10601,11311,1

2017-10-13 14:22:07 587

原创 _variant_t  to Cstring 的转换

CString CMFCDataBaseDlg::VariantToCString(_variant_t var){CString str; //转换以后的字符串switch(var.vt){case VT_BSTR: //var is BSTR typestr=var.bstrVal;break;case VT_I2: //var is short int

2017-10-13 14:22:04 235

原创 Mother's Milk

http://ace.delos.com/usacoprob2?a=apdOY9i86bK&S=milk3分析:每次只有六种选择,可以用递归。代码如下:#include #include #include #include #include using namespace std;int A,B,C;void DFS(int,int,int);bool tong[22][2

2017-10-13 14:22:01 837

原创 Arithmetic Progressions

http://ace.delos.com/usacoprob2?a=ypoaBnzumP9&S=ariprog分析:这题就是暴力搜索,剪枝,加了一个条件以后就过了。。没有再探寻更优解法。代码如下:#include #include #include #include #include using namespace std;struct PP{ int a; int b;

2017-10-13 14:21:58 315

原创 usaco The Clocks

没想到好方法,9个循环……#include #include #include int ans[4][4]={0};int a[10];int tr[4][4]={0};bool check();void move(int,int);void movehelp(int a[][4],int,int);using namespace std;int main(){ ifs

2017-10-13 14:21:55 207

原创 usaco Prime Cryptarithm

PrimeCryptarithmThe following cryptarithm is a multiplication problem that canbe solved by substituting digits from a specified set of N digitsinto the positions marked with *. If the set of prime

2017-10-13 14:21:52 267

原创 Barn Repair

分析:可以想象只用一个木板,这样需要一个长度x,然后计算每两个相邻牛之间的空隙长度,排序。然后需要几个木板就减去相应的空隙长度(从大到小依次减)  #include #include #include #include using namespace std;bool ans[201];struct PP{ int x; int y; int len;};int cm

2017-10-13 14:21:49 159

原创 USACO transform

#include #include using namespace std;struct PP{ char a; bool v;};bool fun11(PP a[][100],int);bool fun12(PP a[][100],int);bool fun13(PP a[][100],int);bool fun2(PP a[][100],int);bool fun3(PP

2017-10-13 14:21:46 183

原创 关于C++ 除法丢失数据

今天做USACO题的时候,遇到了除法四舍五入的问题。C++真不好处理,最后在网上看源代码,发现一个很简答的解决办法:    if(num!=0)    test[j].ans+=money%num;即是说,先对储存答案的数组加上余数,之后在执行除法:   test[j].ans+=money/num;其中test[j].ans和money都是int型变量。这样修改以后终于AC了。

2017-10-13 14:21:43 559

转载 常用数据类型转换CString do…

原文地址:double char int WCHAR(转)">常用数据类型转换CString double char int WCHAR(转)作者:xiaoyo02WCHAR ->CString view plaincopyto clipboardprint?WCHAR ch1[10]=”abc”;  CString ch2;  Ch2=ch1;  CS

2017-10-13 14:21:41 207

原创 HDU 1157 Who's in the Middle

http://acm.hdu.edu.cn/showproblem.php?pid=1157 Who's in the MiddleTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K(Java/Others)Total Submission(s): 4274 Accepted Submission(s):

2017-10-13 14:21:38 321

原创 HDU 1164 Eddy's research I

http://acm.hdu.edu.cn/showproblem.php?pid=1164 Eddy's research ITime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K(Java/Others)Total Submission(s): 3255 Accepted Submission(s):1

2017-10-13 14:21:35 212

原创 HDU 1170 Balloon Comes!

http://acm.hdu.edu.cn/showproblem.php?pid=1170 Balloon Comes!Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K(Java/Others)Total Submission(s): 12972 Accepted Submission(s):459

2017-10-13 14:21:32 156

原创 HDU 1202 The calculation of GPA

http://acm.hdu.edu.cn/showproblem.php?pid=1202 The calculation of GPATime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K(Java/Others)Total Submission(s): 11025 Accepted Submission

2017-10-13 14:21:30 322

原创 HDU 1219 AC Me

http://acm.hdu.edu.cn/showproblem.php?pid=1219 AC MeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K(Java/Others)Total Submission(s): 6651 Accepted Submission(s):2982Problem

2017-10-13 14:21:27 212

原创 HDU 1234 开门人和关门人

http://acm.hdu.edu.cn/showproblem.php?pid=1234 开门人和关门人TimeLimit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K(Java/Others)Total Submission(s): 6587 Accepted Submission(s):3376Proble

2017-10-13 14:21:24 275

原创 HDU 1248 寒冰王座

http://acm.hdu.edu.cn/showproblem.php?pid=1248 寒冰王座Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K(Java/Others)Total Submission(s): 5501 Accepted Submission(s):2678Problem

2017-10-13 14:21:21 172

原创 HDU 1279 验证角谷猜想

http://acm.hdu.edu.cn/showproblem.php?pid=1279 验证角谷猜想Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K(Java/Others)Total Submission(s): 3030 Accepted Submission(s):1543Proble

2017-10-13 14:21:18 244

原创 HDU 1282 回文数猜想

http://acm.hdu.edu.cn/showproblem.php?pid=1282 回文数猜想Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K(Java/Others)Total Submission(s): 1963 Accepted Submission(s):1212Problem

2017-10-13 14:21:16 235

原创 HDU 1237 简单计算器

http://acm.hdu.edu.cn/showproblem.php?pid=1237 简单计算器TimeLimit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K(Java/Others)Total Submission(s): 7456 Accepted Submission(s):2401Problem

2017-10-13 14:21:13 749

原创 HDU 1283 最简单的计算机

http://acm.hdu.edu.cn/showproblem.php?pid=1283 最简单的计算机Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K(Java/Others)Total Submission(s): 2298 Accepted Submission(s):1351Probl

2017-10-13 14:21:10 209

原创 HDU 1303 Doubles

http://acm.hdu.edu.cn/showproblem.php?pid=1303 DoublesTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K(Java/Others)Total Submission(s): 1964 Accepted Submission(s):1361Probl

2017-10-13 14:21:07 204

原创 HDU 1323 Perfection

http://acm.hdu.edu.cn/showproblem.php?pid=1323 PerfectionTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K(Java/Others)Total Submission(s): 830 Accepted Submission(s):504Prob

2017-10-13 14:21:04 189

原创 HDU 1326 Box of Bricks

http://acm.hdu.edu.cn/showproblem.php?pid=1326 Box of BricksTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K(Java/Others)Total Submission(s): 2113 Accepted Submission(s):978

2017-10-13 14:21:01 201

原创 HDU 1334 Perfect Cubes

http://acm.hdu.edu.cn/showproblem.php?pid=1334 Perfect CubesTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K(Java/Others)Total Submission(s): 1027 Accepted Submission(s):433

2017-10-13 14:20:58 189

原创 HDU 1335 Basically Speaking

http://acm.hdu.edu.cn/showproblem.php?pid=1335 Basically SpeakingTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K(Java/Others)Total Submission(s): 962 Accepted Submission(s):4

2017-10-13 14:20:55 206

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除