[R-SIG-Finance] LPPL model for bubble burst forcasting
Wind
windspeedo99 at gmail.com
Fri Jul 17 09:12:24 CEST 2009
There is a chart of Heng Seng index in page 24 of Prof. Sornette's paper:
## Financial Bubbles, Real Estate bubbles, Derivative Bubbles, and the
Financial and Economic Crisis
## http://arxiv.org/abs/0905.0220
The picture has also been attached as .hong kong.jpg
The y axis of the chart is log-axis. And there is a straight line in
the chart. "This is indeed the long-term behavior of this market, as
shown by the best linear fit represented by the solid straight line,
corresponding to an average constant growth rate of 13.8% per year."
The following codes could not plot the same straight line. I wonder
how could plot the straight best fit line in the log plot.
## Financial Bubbles, Real Estate bubbles, Derivative Bubbles, and the
Financial and Economic Crisis
## http://arxiv.org/abs/0905.0220
## chart in Page 24
hsi<-read.csv("http://32xiang.appspot.com/static/hsi-1970.csv",header=TRUE,stringsAsFactors=FALSE)
pr<-hsi$close
plot(pr,type="l",log="y")
grid()
ti<-index(pr)
ti2<-index(pr)^2
lines(lm(pr~ti+ti2)$fit,col="red")
lines(lm(pr~ti)$fit,col="blue")
lines(lm(pr~ti2)$fit,col="pink")
Thanks in advance.
wind
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hong kong .jpg
Type: image/jpeg
Size: 48355 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20090717/bbd27fcd/attachment.jpg>
More information about the R-SIG-Finance
mailing list