Home » date » 2011 » May » 18 »

Exponential Smoothing USD/CAD FX

*Unverified author*
R Software Module: /rwasp_exponentialsmoothing.wasp (opens new window with default values)
Title produced by software: Exponential Smoothing
Date of computation: Wed, 18 May 2011 19:09:54 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2011/May/18/t130574565177wg2hhp773c9um.htm/, Retrieved Wed, 18 May 2011 21:07:35 +0200
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
1.0086 1.0126 1.0158 1.0026 1.0030 0.9880 0.9831 0.9890 0.9972 1.0000 1.0039 0.9999 0.9800 0.9654 0.9809 0.9862 0.9986 1.0220 1.0309 1.0176 0.9953 0.9791 0.9776 0.9923 1.0298 1.0526 1.0698 1.1018 1.1133 1.1274 1.1438 1.1786 1.1865 1.1581 1.1666 1.1750 1.1642 1.1706 1.1587 1.1841 1.1936 1.1987 1.2116 1.1917 1.2090 1.2448 1.2500 1.2316 1.2276 1.2313 1.2329 1.2385 1.2554 1.2927 1.3139 1.3186 1.3542 1.3697 1.3601 1.3796 1.4041 1.3845 1.3855 1.3850 1.3380 1.3330 1.3224 1.3113 1.2676 1.2301 1.2193 1.2068 1.1919 1.1933 1.1826 1.1686 1.1828 1.1706 1.1534 1.1613 1.1560 1.1491 1.1438 1.1349 1.1775 1.1942 1.2019 1.2617 1.2617 1.2703 1.3038 1.3248 1.3414 1.3825 1.3716 1.3681 1.4071 1.3715 1.3558 1.3562 1.3692 1.3648 1.3704 1.3504 1.3592 1.3863 1.3851 1.4089 1.4303 1.4468 1.5144 1.5430 1.5116 1.4729 1.4864 1.4724 1.4535 1.4805 1.4823 1.5257 1.5278 1.5411 1.5462 1.5809 1.5946 1.5545 1.5637 1.5696 etc...
 
Output produced by software:


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Herman Ole Andreas Wold' @ www.yougetit.org


Estimated Parameters of Exponential Smoothing
ParameterValue
alpha0.999926986355262
betaFALSE
gammaFALSE


Interpolation Forecasts of Exponential Smoothing
tObservedFittedResiduals
21.01261.00860.004
31.01581.012599707945420.00320029205457906
41.00261.01579976633501-0.013199766335013
51.0031.002600963763050.000399036236950145
60.9881.00299997086491-0.01499997086491
70.98310.988001095202544-0.00490109520254389
80.9890.9831003578468240.00589964215317607
90.99720.9889995692456240.00820043075437626
1010.9971994012566620.00280059874333782
111.00390.9999997955180780.00390020448192174
120.99991.00389971523186-0.00399971523185561
130.980.999900292033787-0.0199002920337871
140.96540.980001452992853-0.0146014529928526
150.98090.9654010661053020.0154989338946985
160.98620.9808988683663470.00530113163365309
170.99860.9861996129450580.012400387054942
181.0220.9985990946025450.023400905397455
191.03091.021998291414610.0089017085853933
201.01761.03089935005381-0.0132993500538117
210.99531.01760097103402-0.0223009710340202
220.97910.995301628275176-0.0162016282751763
230.97760.97910118293993-0.00150118293993096
240.99230.9776001096068380.0146998903931621
251.02980.9922989267074250.0375010732925749
261.05261.029797261909960.0228027380900426
271.06981.052598335088980.017201664911018
281.10181.069798744043750.0320012559562504
291.11331.101797663471670.0115023365283338
301.12741.113299160172490.0141008398275129
311.14381.127398970446290.0164010295537098
321.17861.143798802501050.0348011974989453
331.18651.178597459037730.00790254096227061
341.15811.18649942300668-0.0283994230066817
351.16661.158102073545380.00849792645461789
361.1751.166599379535420.00840062046458323
371.16421.17499938664008-0.010799386640082
381.17061.164200788502580.00639921149742073
391.15871.17059953277025-0.0118995327702454
401.18411.158700868828260.0253991311717416
411.19361.184098145516860.00950185448314
421.19871.193599306234970.00510069376502775
431.21161.198699627579760.0129003724202423
441.19171.21159905809679-0.0198990580967913
451.2091.191701452902760.0172985470972415
461.24481.208998736970030.0358012630299722
471.251.24479738601930.00520261398070021
481.23161.24999962013819-0.0183996201381911
491.22761.23160134342333-0.00400134342332814
501.23131.227600292152670.00369970784733287
511.23291.231299729870850.00160027012915442
521.23851.232899883158450.00560011684155448
531.25541.238499591115060.0169004088849416
541.29271.255398766039550.0373012339604502
551.31391.292697276500960.0212027234990448
561.31861.313898451911880.00470154808812095
571.35421.318599656722840.0356003432771619
581.36971.354197400689180.0155025993108167
591.36011.36969886809872-0.00959886809872113
601.37961.360100700848350.0194992991516547
611.40411.37959857628510.0245014237149008
621.38451.40409821106175-0.0195982110617532
631.38551.384501430936820.000998569063179966
641.3851.38549992709083-0.000499927090833019
651.3381.3850000365015-0.0470000365014989
661.3331.33800343164397-0.00500343164396799
671.32241.33300036531878-0.0106003653187805
681.31131.32240077397131-0.0111007739713076
691.26761.31130081050797-0.0437008105079668
701.23011.26760319075545-0.0375031907554533
711.21931.23010273824465-0.0108027382446463
721.20681.21930078874729-0.0125007887472923
731.19191.20680091272815-0.0149009127281485
741.19331.191901087969950.00139891203005171
751.18261.19329989786033-0.0106998978603339
761.16861.18260078123854-0.0140007812385412
771.18281.168601022248070.0141989777519327
781.17061.18279896328088-0.0121989632808828
791.15341.17060089069077-0.0172008906907715
801.16131.153401255899720.00789874410027802
811.1561.1612994232839-0.00529942328390454
821.14911.15600038693021-0.00690038693020889
831.14381.1491005038224-0.00530050382239988
841.13491.1438003870091-0.0089003870091029
851.17751.13490064984970.0425993501503048
861.19421.177496889666180.016703110333818
871.20191.194198780445040.00770121955496395
881.26171.201899437705890.0598005622941087
891.26171.261695633742994.36625701039084e-06
901.27031.26169999968120.00860000031879626
911.30381.270299372082630.0335006279173682
921.32481.303797553997050.021002446002945
931.34141.324798466534870.016601533465131
941.38251.341398787861530.0411012121384666
951.37161.3824969990507-0.0108969990506989
961.36811.37160079562962-0.00350079562961714
971.40711.368100255605850.0389997443941514
981.37151.40709715248652-0.035597152486518
991.35581.37150259907785-0.0157025990778454
1001.35621.355801146503990.000398853496009766
1011.36921.356199970878250.0130000291217474
1021.36481.36919905082049-0.00439905082049208
1031.37041.364800321190730.00559967880926626
1041.35041.37039959114704-0.0199995911470408
1051.35921.350401460243040.008798539756957
1061.38631.359199357586540.0271006424134561
1071.38511.38629802128332-0.00119802128332291
1081.40891.38510008747190.0237999125280997
1091.43031.408898262281640.021401737718358
1101.44681.430298437381130.0165015626188747
1111.51441.446798795160770.0676012048392305
1121.5431.514395064189650.0286049358103539
1131.51161.54299791144938-0.031397911449379
1141.47291.51160229247595-0.0387022924759519
1151.48641.472902825795430.0134971742045666
1161.47241.48639901452212-0.0139990145221178
1171.45351.47240102211907-0.0189010221190729
1181.48051.453501380032510.0269986199674859
1191.48231.480498028732350.0018019712676467
1201.52571.482299868431510.04340013156849
1211.52781.525696831198210.00210316880178785
1221.54111.527799846439980.0133001535600195
1231.54621.541099028907310.00510097109268703
1241.58091.546199627559510.0347003724404913
1251.59461.580897466399330.0137025336006658
1261.55451.59459899952808-0.0400989995280798
1271.56371.554502927774110.00919707222589428
1281.56961.563699328488240.00590067151176399
1291.50991.56959956917047-0.0596995691704667
1301.39821.50990435888313-0.111704358883134
1311.38061.39820815594238-0.0176081559423753
1321.3161.38060128563564-0.0646012856356424
1331.31811.316004716775320.002095283224681
1341.35961.318099847015740.0415001529842649
1351.30781.35959696992257-0.0517969699225733
1361.22091.30780378188556-0.0869037818855605
1371.2271.220906345161860.00609365483814295
1381.24391.226999555080050.0169004449199495
1391.20161.24389876603692-0.0422987660369187
1401.17351.20160308838708-0.0281030883870763
1411.15451.17350205190891-0.0190020519089114
1421.12261.15450138740907-0.0319013874090674
1431.12121.12260232923657-0.00140232923656702
1441.13921.121200102389170.0179998976108313
1451.17181.139198685761870.0326013142381294
1461.09841.17179761965922-0.0733976196592243
1471.04491.09840535902773-0.0535053590277266
1480.98161.04490390662128-0.0633039066212755
1491.00380.9816046220489490.0221953779510514
1501.00991.003798379434560.0061016205654405
1511.04161.009899554498440.0317004455015564
1521.21181.041597685434930.170202314565066


Extrapolation Forecasts of Exponential Smoothing
tForecast95% Lower Bound95% Upper Bound
1531.211787572908671.152743849150611.27083129666673
1541.211787572908671.128290186276911.29528495954043
1551.211787572908671.109525821342161.31404932447518
1561.211787572908671.093706591829731.32986855398761
1571.211787572908671.079769504631331.34380564118601
1581.211787572908671.067169376920761.35640576889658
1591.211787572908671.055582339737971.36799280607937
1601.211787572908671.044797372211061.37877777360628
1611.211787572908671.03466789758111.38890724823624
1621.211787572908671.025087193564491.39848795225285
1631.211787572908671.015974693081081.40760045273626
1641.211787572908671.007267803288491.41630734252885
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2011/May/18/t130574565177wg2hhp773c9um/1uiv31305745792.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/18/t130574565177wg2hhp773c9um/1uiv31305745792.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/18/t130574565177wg2hhp773c9um/29h641305745792.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/18/t130574565177wg2hhp773c9um/29h641305745792.ps (open in new window)


http://www.freestatistics.org/blog/date/2011/May/18/t130574565177wg2hhp773c9um/34sgn1305745792.png (open in new window)
http://www.freestatistics.org/blog/date/2011/May/18/t130574565177wg2hhp773c9um/34sgn1305745792.ps (open in new window)


 
Parameters (Session):
par1 = 12 ; par2 = Single ; par3 = additive ;
 
Parameters (R input):
par1 = 12 ; par2 = Single ; par3 = additive ;
 
R code (references can be found in the software module):
par1 <- as.numeric(par1)
if (par2 == 'Single') K <- 1
if (par2 == 'Double') K <- 2
if (par2 == 'Triple') K <- par1
nx <- length(x)
nxmK <- nx - K
x <- ts(x, frequency = par1)
if (par2 == 'Single') fit <- HoltWinters(x, gamma=F, beta=F)
if (par2 == 'Double') fit <- HoltWinters(x, gamma=F)
if (par2 == 'Triple') fit <- HoltWinters(x, seasonal=par3)
fit
myresid <- x - fit$fitted[,'xhat']
bitmap(file='test1.png')
op <- par(mfrow=c(2,1))
plot(fit,ylab='Observed (black) / Fitted (red)',main='Interpolation Fit of Exponential Smoothing')
plot(myresid,ylab='Residuals',main='Interpolation Prediction Errors')
par(op)
dev.off()
bitmap(file='test2.png')
p <- predict(fit, par1, prediction.interval=TRUE)
np <- length(p[,1])
plot(fit,p,ylab='Observed (black) / Fitted (red)',main='Extrapolation Fit of Exponential Smoothing')
dev.off()
bitmap(file='test3.png')
op <- par(mfrow = c(2,2))
acf(as.numeric(myresid),lag.max = nx/2,main='Residual ACF')
spectrum(myresid,main='Residals Periodogram')
cpgram(myresid,main='Residal Cumulative Periodogram')
qqnorm(myresid,main='Residual Normal QQ Plot')
qqline(myresid)
par(op)
dev.off()
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Estimated Parameters of Exponential Smoothing',2,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Parameter',header=TRUE)
a<-table.element(a,'Value',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'alpha',header=TRUE)
a<-table.element(a,fit$alpha)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'beta',header=TRUE)
a<-table.element(a,fit$beta)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'gamma',header=TRUE)
a<-table.element(a,fit$gamma)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Interpolation Forecasts of Exponential Smoothing',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'t',header=TRUE)
a<-table.element(a,'Observed',header=TRUE)
a<-table.element(a,'Fitted',header=TRUE)
a<-table.element(a,'Residuals',header=TRUE)
a<-table.row.end(a)
for (i in 1:nxmK) {
a<-table.row.start(a)
a<-table.element(a,i+K,header=TRUE)
a<-table.element(a,x[i+K])
a<-table.element(a,fit$fitted[i,'xhat'])
a<-table.element(a,myresid[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable1.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Extrapolation Forecasts of Exponential Smoothing',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'t',header=TRUE)
a<-table.element(a,'Forecast',header=TRUE)
a<-table.element(a,'95% Lower Bound',header=TRUE)
a<-table.element(a,'95% Upper Bound',header=TRUE)
a<-table.row.end(a)
for (i in 1:np) {
a<-table.row.start(a)
a<-table.element(a,nx+i,header=TRUE)
a<-table.element(a,p[i,'fit'])
a<-table.element(a,p[i,'lwr'])
a<-table.element(a,p[i,'upr'])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable2.tab')
 





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by