python股票_python股票 - 随笔分类 - 無碼 - 博客园

摘要:Python在量化领域的现状 就跟Java在web领域无可撼动的地位一样,Python也已经在金融量化投资领域占据了重要位置,从各个业务链条都能找到相应的框架实现。 在量化投资(证券和比特币)开源项目里,全球star数排名前10位里面,有7个是Python实现的。从数据获取到策略回测再到交易,覆盖了

阅读全文

posted @ 2018-01-04 11:52

無碼

阅读(7702)

评论(0)

推荐(0) 编辑

摘要:一、量化投资—为什么选择Python? 二、Windows环境下python的安装与使用

阅读全文

posted @ 2018-01-04 11:51

無碼

阅读(1048)

评论(0)

推荐(0) 编辑

该文被密码保护。

posted @ 2017-10-11 14:55

無碼

阅读(5)

评论(0)

推荐(0) 编辑

该文被密码保护。

posted @ 2017-06-29 08:55

無碼

阅读(8)

评论(0)

推荐(0) 编辑

摘要:from tkinter import * import urllib.request from PIL import Image, ImageTk import os,io,threading,time from tkinter import messagebox from win32api import GetSystemMetrics print(GetSystemMetrics(0),...

阅读全文

posted @ 2017-06-21 13:59

無碼

阅读(255)

评论(0)

推荐(0) 编辑

摘要:from tkinter import * import urllib.request import re,os import threading from tkinter import filedialog win=Tk() win.title('海啸投资-股票数据下载') win.geometry('200x120+400+200') win.attributes("-toolwind...

阅读全文

posted @ 2017-06-08 10:45

無碼

阅读(343)

评论(0)

推荐(0) 编辑

摘要:一、函数索引 重叠研究 动能指标 体积指标 周期指标 价格︰ 变换 波动性指标 模式识别 统计函数 数学变换 数学运算符 二、函数用法 以下提供的用法仅作参考最好的方法是在程序内调用帮助程序。 重叠研究功能 BBANDS-布林 德玛-双指数移动平均线 EMA-指数移动平均线 HT_TRENDLINE

阅读全文

posted @ 2017-06-06 13:00

無碼

阅读(7409)

评论(1)

推荐(0) 编辑

摘要:import pandas as pd import numpy as np import os import matplotlib.pyplot as plt all_stock_data = pd.DataFrame() stock_code_list = [] t = os.listdir('all_stock_data1') for f in t: stock_code_...

阅读全文

posted @ 2017-05-08 14:35

無碼

阅读(209)

评论(0)

推荐(0) 编辑

摘要:import pandas as pd import numpy as np import os import matplotlib.pyplot as plt all_stock_data = pd.DataFrame() stock_code_list = []#t = os.listdir('all_stock_data')#for i in t:# print(i.spl...

阅读全文

posted @ 2017-04-25 14:46

無碼

阅读(304)

评论(0)

推荐(0) 编辑

摘要:股票数据的获取目前有如下两种方法可以获取:1. http/javascript接口取数据2. web-service接口1.http/javascript接口取数据1.1Sina股票数据接口以大秦铁路(股票代码:601006)为例,如果要获取它的最新行情,只需访问新浪的股票数据接口:http://h

阅读全文

posted @ 2017-03-31 12:09

無碼

阅读(3156)

评论(0)

推荐(1) 编辑

摘要:#http://q.stock.sohu.com/cn/000078/lshq.shtml

阅读全文

posted @ 2017-03-31 10:36

無碼

阅读(278)

评论(0)

推荐(0) 编辑

摘要:# -*- coding: utf-8 -*- import os import pandas as pd # ========== 遍历数据文件夹中所有股票文件的文件名,得到股票代码列表stock_code_list stock_code_list = [] for root, dirs, files in os.walk('all_stock_data'):# 注意:这里请填写数据文件在...

阅读全文

posted @ 2017-01-01 13:16

無碼

阅读(491)

评论(0)

推荐(0) 编辑

摘要:import urllib.request import re ##def downback(a,b,c): ## '''' ## a:已经下载的数据块 ## b:数据块的大小 ## c:远程文件的大小 ## ''' ## per = 100.0 * a * b / c ## if per > 100 : ## per = 100 ## ...

阅读全文

posted @ 2017-01-01 12:14

無碼

阅读(7886)

评论(0)

推荐(0) 编辑

摘要:import urllib.request import re stock_CodeUrl = 'http://quote.eastmoney.com/stocklist.html' #获取股票代码列表 def urlTolist(url): allCodeList = [] html = urllib.request.urlopen(url).read() html...

阅读全文

posted @ 2016-12-25 13:41

無碼

阅读(2945)

评论(7)

推荐(0) 编辑

摘要:以上是pandas0.17版本。 以下是pandas0.19版本。

阅读全文

posted @ 2016-11-18 09:09

無碼

阅读(947)

评论(0)

推荐(0) 编辑

摘要:import os import pandas as pd stock_data = pd.read_csv('stock data/sh600898.csv',parse_dates=[1]) #设定转换周期period_type 转换为周是'W',月'M',季度线'Q',五分钟'5min',12天'12D' period_type = 'W' #将[date]设定为 index ...

阅读全文

posted @ 2016-11-18 08:47

無碼

阅读(2897)

评论(0)

推荐(1) 编辑

摘要:import os import pandas as pd stock_code_list = [] for root,dirs,files in os.walk('stock data'): if files: for f in files: if '.csv' in f: stock_code_list.ap...

阅读全文

posted @ 2016-11-14 15:10

無碼

阅读(919)

评论(0)

推荐(0) 编辑

摘要:import pandas as pd import numpy as np df = pd.read_csv('000917.csv',encoding='gbk') df = df[df['涨跌幅']!='None'] df['涨跌幅'] = df['涨跌幅'].astype(np.float64) print(df[df['涨跌幅']>5])

阅读全文

posted @ 2016-11-11 11:22

無碼

阅读(17303)

评论(0)

推荐(0) 编辑

摘要:1、pip install lxml 2、pip install pandas 3、pip install requests 4、pip install lxml 5、pip install tushare 升级参数后加--upgrade

阅读全文

posted @ 2016-10-13 11:34

無碼

阅读(2735)

评论(0)

推荐(0) 编辑

摘要:生成时间序列: dates = pandas.date_range('2013-01-01',periods = 6) Pandas读取excel数据: df=pd.read_excel("mystock.xls") DF排序: df=df.sort('data',ascending=False)

阅读全文

posted @ 2016-09-16 15:57

無碼

阅读(179)

评论(0)

推荐(0) 编辑

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值