自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

转载 python 评分卡建模记录---使用到的各种函数(1)(转载)

python 评分卡建模记录—使用到的各种函数(1) 用python评分卡建模过程中使用到的numpy 和pandas中的方法(一)python选取特定列——pandas的iloc和loc以及icol使用(列切片及行切片)df是一个dataframe,列名为A B C D具体值如下:A   ...

2019-08-01 15:47:54 295

原创 Quantitative Finance --- S7 Stationary Process AR,MA,ARMA

Stationary ProcessesComponents of a time series:white noise:Stationary Process:AR: autoregressiveMA: moving averageARMA: autoregressive moving average order oneSample ACF(自相关)J...

2019-02-24 16:39:51 267

原创 Quantitative Analysis --- S6 Modeling and Forecasting Trend

Modeling TrendModel 1: Trendt is a simple linear function of timeTrendt = β0 + β1TIMEtModel 2: Trendt is a quadratic function of timeTrendt = β0 + β1TIMEt + β2TIME2Model 3: Trend of Constant Gro...

2019-02-24 12:55:41 253

原创 # Quantitatve Analysis ---S6 Diagnostic Tests

HeteroscedasticityThe variance of the errors is not constant.Tests:GQ test:Split the total sample of length T into two sub-samples of length T1 and T2. The regression model is estimated on each...

2019-02-24 12:15:48 238

原创 coursera

推荐一个学习的网站:coursera

2019-02-07 17:58:41 1023

原创 爬虫 学习笔记(2) Python(容器,文件读写,异常处理,logging,多线程,)

代码格式关键字基本语法容器与字符串函数面向对象文件读写多线程错误与异常关键字常量:True False None对象与容器:class import from del逻辑操作:and or not函数:def return判断与循环控制:if elif else is assert while**for ** 只作用于容器continue 结束本次迭代进入下一...

2019-01-05 20:18:46 390

转载 HTML 学习笔记(6)脚本,字符实体,URL,速查列表,总结

HTML 脚本JavaScript 使 HTML 页面具有更强的动态和交互性。脚本标签 <script> <noscript><script> 标签用于定义客户端脚本,比如 JavaScript。<script>元素既可包含脚本语句,也可通过 src 属性指

2019-01-05 12:50:28 111

转载 HTML 学习笔记(5)样式,区块,布局,表单,框架,颜色

区块<div>, <span>大多数 HTML 元素被定义为块级元素或内联元素。块级元素在浏览器显示时,通常会以新行来开始(和结束)。实例: <h1>, <p&a

2019-01-05 12:50:05 432

转载 HTML 学习笔记(4)样式- CSS,图像,表格,列表

CSS (Cascading 串联 Style Sheets) 用于渲染HTML元素标签的样式.CSS 可以通过以下方式添加到HTML中:内联样式- 在HTML元素中使用"style" 属性<a href="http://www.runoob.com/" style="text-decorat

2019-01-05 12:49:53 188

转载 HTML 学习笔记(3)基础内容head

<head><title>定义文档标题<DOCTYPE html><html><head>&a

2019-01-05 12:49:32 106

转载 HTML 学习笔记(2)基础内容

实例<!DOCTYPE html><html><head><meta charset=&amp

2019-01-05 12:49:04 143

转载 HTML 学习笔记(1) HTML简介

转载: HTML 简介超文本标记语言(英语:HyperText Markup Language,简称:HTML)是一种用于创建网页的标准标记语言。HTML 使用标记标签来描述网页。HTML文档也叫做 web 页面可以使用 HTML 来建立自己的 WEB 站点,HTML 运行在浏览器上,由浏览器来解析。HTML文档的后缀名.html.htm以上两种后缀名没有区别,都可以使用。...

2019-01-05 12:48:40 128

原创 HTML,XML,Json教程 速查

HTML 速查列表参考手册HTML 教程- (HTML5 标准)

2019-01-05 12:19:15 116

转载 Python3 标准库概览(os, sys, glob, re, math)

转载:Python3 标准库概览操作系统接口os模块提供了不少与操作系统相关联的函数。import osos.getcwd()os.chdir('C:\\Users')os.system('mkdir today')# 执行系统命令 mkdir 在使用 os 这样的大型模块时内置的 dir() 和 help() 函数非常有用:dir(os)help(os)针对日常的文件...

2019-01-02 21:27:33 756

转载 Python3 OS 文件/目录方法

转载:Python3 OS 文件/目录方法os 模块提供了方法用来处理文件和目录# os.access(path,mode): 检测path是否有访问权限(os.F_OK,os.R_OK,os.W_OK,os.W_OK-->是否可写,os.X_OK-->是否可执行)import osimport sysret = os.access('/tmp/foo.txt',os.F_O...

2019-01-02 13:52:13 325

转载 Python3 input & output

转载: Python3 输入和输出1. 输出格式美化表达式语句print()使用文件对象的write()方法str.format() 函数来格式化输出值repr(), str() 将输出转换成字符串repr(): 产生一个解释器易读的表达形式str(): 返回一个用户易读的表达形式#repr() 可以转移特殊字符hello = 'hello,runoob\n'hellos...

2019-01-01 23:41:55 718

转载 Python3 print &pprint

转载:https://blog.csdn.net/qq_24185239/article/details/809775561. print() function 输出结果都在一行,不方便查看2. pprint() module 打印的数据结构更加完澡,每行为一个数据结构,更加方便阅读和打印输出结果*注意pprint是一个模块import pprintdata =('test',[1,2,...

2019-01-01 22:15:30 1263

原创 Pandas杂记(2)——Pandas and Time Series

PandasPandas 支持时间序列的类型的数据。时间序列类型是一种Series,时间序列的index属性取值为时间戳创建时间序列Timestamp(),传入数据类型可以是str类型,也可以是datetime类型to_datetime() 将Series的index属性转换为datetime转换为DATe timefrom datetime import datetimeim...

2018-12-29 02:49:33 145

原创 pandas杂记(1)——计算return

Seriespandas.Series.pct_changes = pd.Series([90, 91, 85])s.pct_change() #求returndataframedf = pd.DataFrame({... '2016': [1769950, 30586265],... '2015': [1500923, 40912316],... ...

2018-12-29 02:44:02 936

转载 if __name__ == '__main__'

转载:http://blog.konghy.cn/2017/04/24/python-entry-program/这个问题来自于知乎用户的提问,当时看到这个问题,我只是做了下简单的回答。后来我发现,对于很多人来说,更准确的说应该是大部分的 Python 初学者,对这个问题理解的不是很深刻。所以这里我来做下总结,并试图把这个问题说明白。程序入口对于很多编程语言来说,程序都必须要有一个入口,比如...

2018-12-28 21:43:50 142

转载 爬虫(1)——获取邮编,获取股票(实例)

import requestsfrom xml.parsers.expat import ParserCreate #xml- extensible markup language 用来数据传输class DefaultSaxHandler(object): def __init__(self,provinces): self.provinces = provinc...

2018-12-28 19:59:26 118

原创 Python3 时间和日期功能:calendar,time,datetime

1. calendarimport calendart=calendar.month(2016,2)print(t,type(t))#isleapcalendar.isleap(2016)February 2016Mo Tu We Th Fr Sa Su1 2 3 4 5 6 78 9 10 11 12 13 1415 16 17 18 19 20 2122...

2018-12-24 17:20:02 236

转载 Python basic tutorials-----Ditionary

转载:http://www.runoob.com/python/python-dictionary.htmldict = {'Name':'Zara','Age':7,'Class':'First'}print("dict['Name']:",dict['Name'])print("dict['Age']:",dict['Age'])dict[‘Name’]: Zaradict[‘Ag...

2018-12-20 20:15:37 145

原创 爬虫(一)——环境准备与入门

1. 什么是爬虫网络爬虫,是一种按照一定的规则,自动地抓取万维网信息的程序或者脚本。另外一些不常使用的名字还有蚂蚁、自动索引、模拟程序或者蠕虫。由于专门用于检索信息的“机器人”程序象蜘蛛一样在网络间爬来爬去,因此,搜索引擎的“机器人”程序就被称为“蜘蛛”程序。2. python 开发环境搭建上手容易免费开源,使用不受限制解释执行,跨平台不受限制面向对象框架和库支持丰富,有大量的历史...

2018-12-19 23:42:49 255

转载 API, SDK

转载:https://www.zhihu.com/question/21691705/answer/149935191SDK(software development kit),中文可译为“软件开发工具包”。一般都是一些被软件工程师用于为特定的软件包、软件架构、硬件平台、操作系统等建立应用软件的开发工具的集合。通俗点是指由第三方服务商提供的实现软件产品某项功能的工具包。在编辑器里敲代码的时候它...

2018-12-19 21:55:05 223

原创 Moving Average Cross移动平均交叉

import pandas as pdimport numpy as npimport matplotlib.pyplot as pltimport matplotlib.dates as mdatesplt.rcParams["figure.figsize"]=[12,8]data=pd.read_csv('CC3.SI.csv',index_col=0,parse_dates=Tru...

2018-12-19 15:57:49 233

原创 option valuation function

import numpy as npimport pandas as pdfrom scipy.stats import normfrom scipy import interpolatefrom math import log, sqrt, expfrom scipy.optimize import brentqimport matplotlib.pylab as pltimpor...

2018-12-11 21:08:36 162

原创 scipy.stats的用法——常见的分布和函数

介绍python统计函数库scipy.stats中常见的分布和函数#commom distributions:'''uniform,norm,poisson,bernoulli,expon,lognormnorm,t,chi2,f'''#commom function:'''rvs产生服从制定分布的随机数pdf概率密度函数cdf累计分布函数sf残存函数(1-cdf)ppf分...

2018-11-05 15:00:43 24067

原创 linear factor model

contentAssume that the risk-free rate is 0.13% per month. Assume that the risk-free rate is 0.13% per month.(1) Regress the monthly realized excess returns for each of the ten industry portfolios ...

2018-10-31 13:58:47 677

原创 Mean-Variance Analysis

Content(1) Calculate the vector of mean returns and covariance matrix of returns for the ten industry portfolios. Create a table showing the mean returns and standard deviation of returns for the te...

2018-10-31 13:52:21 1190

原创 list comprehension

list can not use as follow:the solution is list comprehension;or use numpy.ndarrayx=[1,2,3,4]#Q1: Compare x>1 element-by-elementprint([s>1 for s in x])#list comprehensionprint(any([s&g...

2018-10-30 22:27:43 437

原创 statistic—偏度,峰度,卡方分布,t分布,f分布

from __future__ import print_function, divisionimport numpy as npimport pandas as pdimport matplotlib.pyplot as pltfrom scipy.stats import chi2, t, fDJIA = pd.read_csv('^DJI.csv')DJIA.index = p...

2018-10-30 18:36:55 5659

原创 matlab---call option

classdef call_option properties S0,K,T,r,sigm end methods function obj=call_option(S0,K,T,r,sigm) obj.S0=S0; obj.K=K; obj.T=T; ...

2018-10-20 00:43:47 391

转载 Canny Edge Dection

%Input imageimg = imread ('House.jpg');%Show input imagefigure, imshow(img);img = rgb2gray(img);img = double (img);%Value for ThresholdingT_Low = 0.075;T_High = 0.175;%Gaussian Filter Coeffic...

2018-10-11 18:17:55 175

转载 WEKA使用教程

                WEKA使用教程目录 1. 简介2. 数据格式3.数据准备4. 关联规则(购物篮分析)5. 分类与回归6. 聚类分析 1. 简介 WEKA的全名是怀卡托智能分析环境(Waikato Env

2018-10-04 20:53:16 965

空空如也

空空如也

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

TA关注的人

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