Toggle Navigation
FangQuant
Financial Futures
Policy
Option
Commodities Futures
Asset Management
Bond
Stock
Daily Morning
Strategies
Codes
FDL
OTC
Rules
Student Zone
FangQuant › Codes
R-Code for analysis: getKDJ
getKDJ<-function(rt,n){ l=length(rt[["Chg"]]) K=array(0,c(l-n+1)) D=array(0,c(l-n+1)) J=array(0,c(l-n+1)) daycount=0 for(i in n:l){ daycount=daycount+1 nlow=rt[["Low"]][i] nhigh=rt[["High"]][i] for...
Codes
•
Fang
•
8 years ago
R-Code for analysis: getRSI
import math import pandas as pd import numpy as np import matplotlib.dates as mdates import matplotlib.pyplot as plt from datetime import datetime # 止盈线倍数u u=1.5 # 止损线倍数d d=1 # 均线天数N N=5...
Codes
•
Fang
•
8 years ago
R-Code@July 01, 2016
#Polynomial regression set.seed(20) q<-seq(from=0,to=20,by=0.1) y<--500+0.4*(q-10)^3 noise<-rnorm(length(q),mean=10,sd=80) noisy.y<-y+noise plot(q,noisy.y,col='deepskyblue4',xlab='q'...
Codes
•
Fang
•
8 years ago
R-Code@June 26, 2016
#Odds: runs<-100 game<-function(){ results<-sample(c(-1,0,1,2),10,replace=T) return(sum(results)>5) } sum(replicate(runs,game()))/runs #Time Series Analysis require("astsa") ...
Codes
•
Fang
•
8 years ago
R-Code@June 06, 2016
1.Normal Distribution set.seed(1) cord.x<-c(0,seq(0,5,0.1),5) cord.y<-c(0,dnorm(seq(0,5,0.1),0,5),0) curve(dnorm(x,0,5),xlim=c(-15,15),main='Normal Distribution,PDF',col="darkgreen",xlab="",yl...
Codes
•
Fang
•
8 years ago
Hot Topics
The 13rd China International Future Forum
The Shanghai Derivatives Energy Forum has received extensive attention from relevant industries both within and outside the borders.
Financial institutions deep explore commodity market opportunities, commodity index financial products show full-scale trend
New indicator to analyze the arbitrage opportunities between sse50 and csi500
Market review: January 11, 2017
The Great China Bubble: Anniversary Lessons and Outlook
R-Code@June 06, 2016
Sleepless in London--Enda Homan(Allied Irish Banks Plc)
The hedge strategy between SSE50 and A50--Jan 13,2017
R-Code for analysis: getKDJ
Quant Investment in China A-share market
MSCI Rebuffs Chinese Equities for Third Time in Blow to Xi
The arbitraging strategy between CSI300 and SSE50
Market review: June 17, 2016
Soros, Druckenmiller among hedgies profiting in market plunge
Links
Contact Me: sherry_ustc@163.com
Linkedin
Twitter