3.7. ROBUSTNESS
361
[ac
0
ac -a_1 0.5
0. 0.5 5 0]
= -# For minimization
[gam 2.0]'
[1. 0. 0.
0. 1. 0.
0. 0. rho]
[0. 1. 0.]'
[0. 0. sigma_d]'
## Functions
function evaluate_policy(theta, F)
rlq RBLQ(Q, R, A, B, C, bet, theta)
K_F, P_F, d_F, O_F, o_F evaluate_F(rlq, F)
x0 [1.0 0.0 0.0]'
value = - x0'*P_F*x0 d_F
entropy x0'*O_F*x0 o_F
return value[1], entropy[1# return scalars
end
function value_and_entropy(emax, F, bw, , grid_size=1000)
if lowercase(bw) == "worst"
thetas ./ linspace(1e-81000, grid_size)
else
thetas = -./ linspace(1e-81000, grid_size)
end
data Array(Float64, grid_size, 2)
for (i, theta) in enumerate(thetas)
data[i, :] collect(evaluate_policy(theta, F))
if data[i, 2>= emax # stop at this entropy level
data data[1:i, , :]
break
end
end
return data
end
## Main
# compute optimal rule
optimal_lq LQ(Q, R, A, B, C, bet)
Po, Fo, Do stationary_values(optimal_lq)
# compute robust rule for our theta
baseline_robust RBLQ(Q, R, A, B, C, bet, theta)
Fb, Kb, Pb robust_rule(baseline_robust)
# Check the positive definiteness of worst-case covariance matrix x to
T
HOMAS
S
ARGENTAND
J
OHN
S
TACHURSKI
April20,2016
Pdf page size - Compress reduce PDF size in C#.net, ASP.NET, MVC, Ajax, WinForms, WPF
C# Code & .NET API to Compress & Decompress PDF Document
change paper size in pdf; optimize scanned pdf
Pdf page size - VB.NET PDF File Compress Library: Compress reduce PDF size in vb.net, ASP.NET, MVC, Ajax, WinForms, WPF
VB.NET PDF Document Compression and Decompression Control SDK
pdf file size limit; change paper size pdf
3.7. ROBUSTNESS
362
# ensure that t theta a exceeds the breakdown point
test_matrix eye(size(Pb, 1)) (C' * Pb ./ theta)[1]
eigenvals, eigenvecs eig(test_matrix)
@assert all(eigenvals .>= 0)
emax 1.6e6
# compute values and entropies
optimal_best_case value_and_entropy(emax, Fo, "best")
robust_best_case value_and_entropy(emax, Fb, "best")
optimal_worst_case value_and_entropy(emax, Fo, "worst")
robust_worst_case value_and_entropy(emax, Fb, "worst")
# plot results
fig, ax subplots()
ax[:set_xlim](0, emax)
ax[:set_ylabel]("Value")
ax[:set_xlabel]("Entropy")
ax[:grid]()
for axis in ["x""y"]
plt.ticklabel_format(style="sci", axis=axis, scilimits=(0,0))
end
plot_args {:lw => 2, :alpha => 0.7}
colors ("r""b")
# we reverse order of "worst_case"s so values are ascending
data_pairs ((optimal_best_case, optimal_worst_case),
(robust_best_case, robust_worst_case))
egrid linspace(0, emax, 100)
egrid_data Array{Float64}[]
for (c, data_pair) in zip(colors, data_pairs)
for data in data_pair
x, y data[:, 2], data[:, 1]
curve(z) InterpIrregular(x, , y, BCnearest, InterpLinear)[z]
ax[:plot](egrid, curve(egrid), color=c; plot_args...)
push!(egrid_data, curve(egrid))
end
end
ax[:fill_between](egrid, egrid_data[1], , egrid_data[2],
color=colors[1], alpha=0.1)
ax[:fill_between](egrid, egrid_data[3], , egrid_data[4],
color=colors[2], alpha=0.1)
plt.show()
Here’sanothersuchfigure,withq=0.002insteadof0.02
Canyouexplainthedifferentshapeofthevalue-entropycorrespondencefortherobustpolicy?
T
HOMAS
S
ARGENTAND
J
OHN
S
TACHURSKI
April20,2016
C# PDF File Split Library: Split, seperate PDF into multiple files
Divide PDF file into multiple files by outputting PDF file size. control, C# developers can easily and accurately disassemble multi-page PDF document into two
advanced pdf compressor online; pdf edit text size
C# PDF Thumbnail Create SDK: Draw thumbnail images for PDF in C#.
public override Bitmap ConvertToImage(Size targetSize). Description: Convert the PDF page to bitmap with specified size. Parameters:
batch pdf compression; compress pdf
3.7. ROBUSTNESS
363
Appendix
Wesketchtheproofonlyofthefirstclaiminthissection,whichisthat,foranygivenq,K(
ˆ
F,q)=
ˆ
K,
where
ˆ
Kisasgivenin(3.61)
Thisisthecontentofthenextlemma
Lemma.If
ˆ
PisthefixedpointofthemapBDand
ˆ
Fistherobustpolicyasgivenin(3.60),then
K(
ˆ
F,q)=(qI C
ˆ
PC)
1
C
ˆ
P(A B
ˆ
F)
(3.81)
Proof: Asafirststep,observethatwhen=
ˆ
F,theBellmanequationassociatedwiththeLQ
problem(3.64)–(3.65)is
˜
PR
ˆ
F
0
Q
ˆ
F b
2
(A B
ˆ
F)
0˜
PC(bqI+bC
0˜
PC)
1
C
˜
P(A B
ˆ
F)+b(A B
ˆ
F)
˜
P(A B
ˆ
F(3.82)
(revisitthisdiscussionifyoudon’tknowwhere(3.82)comesfrom)andtheoptimalpolicyis
w
t+1
b(bqI+bC
˜
PC)
1
C
˜
P(A B
ˆ
F)x
t
Supposeforamomentthat
ˆ
PsolvestheBellmanequation(3.82)
Inthiscasethepolicybecomes
w
t+1
=(qI C
ˆ
PC)
1
C
ˆ
P(A B
ˆ
F)x
t
whichisexactlytheclaimin(3.81)
Henceitremainsonlytoshowthat
ˆ
Psolves(3.82),or,inotherwords,
ˆ
P=R+
ˆ
F
0
Q
ˆ
F+b(A B
ˆ
F)
0
ˆ
PC(qI+C
0
ˆ
PC)
1
C
0
ˆ
P(A B
ˆ
F)+b(A B
ˆ
F)
0
ˆ
P(A B
ˆ
F)
UsingthedefinitionofD,wecanrewritetheright-handsidemoresimplyas
R+
ˆ
F
0
Q
ˆ
F+b(A B
ˆ
F)
0
D(
ˆ
P)(A B
ˆ
F)
Althoughitinvolvesasubstantialamountofalgebra,itcanbeshownthatthelatterisjust
ˆ
P
(Hint:Usethefactthat
ˆ
P=B(D(
ˆ
P)))
T
HOMAS
S
ARGENTAND
J
OHN
S
TACHURSKI
April20,2016
VB.NET PDF File Split Library: Split, seperate PDF into multiple
Separate source PDF document file by defined page range in VB.NET class application. Divide PDF file into multiple files by outputting PDF file size.
change font size in fillable pdf form; 300 dpi pdf file size
VB.NET PDF Thumbnail Create SDK: Draw thumbnail images for PDF in
Program.RootPath + "\\" 1.pdf" Dim doc As PDFDocument = New PDFDocument(inputFilePath) Dim page As PDFPage = doc.GetPage(0) ' Define the size of the
change font size pdf document; pdf change page size
3.8. COVARIANCESTATIONARYPROCESSES
364
3.8 CovarianceStationaryProcesses
Contents
• CovarianceStationaryProcesses
– Overview
– Introduction
– SpectralAnalysis
– Implementation
Overview
Inthislecturewestudycovariancestationarylinearstochasticprocesses,aclassofmodelsrou-
tinelyusedtostudyeconomicandfinancialtimeseries
Thisclasshastheadvantangeofbeing
1. simpleenoughtobedescribedbyanelegantandcomprehensivetheory
2. relativelybroadintermsofthekindsofdynamicsitcanrepresent
Weconsiderthesemodelsinboththetimeandfrequencydomain
ARMAProcesses Wewillfocusmuchofourattentiononlinearcovariancestationarymodels
withafinitenumberofparameters
Inparticular,wewillstudystationaryARMAprocesses,whichformacornerstoneofthestandard
theoryoftimeseriesanalysis
It’swellknownthateveryARMAprocessescanberepresentedinlinearstatespaceform
However,ARMAhavesomeimportantstructurethatmakesitvaluabletostudythemseparately
SpectralAnalysis Analysisinthefrequencydomainisalsocalledspectralanalysis
Inessence,spectralanalysisprovidesanalternativerepresentationoftheautocovarianceofaco-
variancestationaryprocess
Havingasecondrepresentationofthisimportantobject
• shinesnewlightonthedynamicsoftheprocessinquestion
• allowsforasimpler,moretractablerepresentationincertainimportantcases
ThefamousFouriertransformanditsinverseareusedtomapbetweenthetworepresentations
OtherReading Forsupplementaryreading,see
• [LS12],chapter2
T
HOMAS
S
ARGENTAND
J
OHN
S
TACHURSKI
April20,2016
C# PDF Convert to Jpeg SDK: Convert PDF to JPEG images in C#.net
Using this C#.NET PDF to JPEG conversion library component toolkit, C# developers can easily and quickly convert a large-size multi-page PDF document to a
pdf text box font size; best pdf compression tool
C# PDF Convert to Tiff SDK: Convert PDF to tiff images in C#.net
zoomValue, The magnification of the original PDF page size. 0.1f
pdf font size change; pdf page size dimensions
3.8. COVARIANCESTATIONARYPROCESSES
365
• [Sar87],chapter11
• JohnCochrane’snotes on time series analysis,chapter8
• [Shi95],chapter6
• [CC08],all
Introduction
ConsiderasequenceofrandomvariablesfX
t
gindexedbyt2ZandtakingvaluesinR
Thus,fX
t
gbeginsintheinfinitepastandextendstotheinfinitefuture—aconvenientandstan-
dardassumption
Asinotherfields,successfuleconomicmodelingtypicallyrequiresidentifyingsomedeepstruc-
tureinthisprocessthatisrelativelyconstantovertime
Ifsuchstructurecanbefound,theneachnewobservationX
t
,X
t+1
,...providesadditionalinfor-
mationaboutit—whichishowwelearnfromdata
Forthisreason,wewillfocusinwhatfollowsonprocessesthatarestationary—orbecomesoafter
sometransformation(differencing,cointegration,etc.)
Definitions Areal-valuedstochasticprocessfX
t
giscalledcovariancestationaryif
1. Itsmeanm:=EX
t
doesnotdependont
2. ForallkinZ,thek-thautocovarianceg(k:=E(X
t
m)(X
t+k
m)isfiniteanddepends
onlyonk
Thefunctiong:Z!Riscalledtheautocovariancefunctionoftheprocess
Throughoutthislecture,wewillworkexclusivelywithzero-mean(i.e.,m=0)covariancestation-
aryprocesses
Thezero-meanassumptioncostsnothingintermsofgenerality, sinceworkingwithnon-zero-
meanprocessesinvolvesnomorethanaddingaconstant
Example1: WhiteNoise Perhapsthesimplestclassofcovariancestationaryprocessesisthe
whitenoiseprocesses
Aprocessfe
t
giscalledawhitenoiseprocessif
1. Ee
t
=0
2. g(k)=s
2
1fk=0gforsomes>0
(Here1fk=0gisdefinedtobe1ifk=0andzerootherwise)
T
HOMAS
S
ARGENTAND
J
OHN
S
TACHURSKI
April20,2016
C# PDF Convert to Word SDK: Convert PDF to Word library in C#.net
zoomValue, The magnification of the original PDF page size. 0.1f
best online pdf compressor; best way to compress pdf file
C# Convert: PDF to Word: How to Convert Adobe PDF to Microsoft
Support fast Word and PDF conversion with original document page size remained. Microsoft Office Word 2003 (.doc) and 2007 (.docx) versions are available.
change font size pdf; change font size in pdf comment box
3.8. COVARIANCESTATIONARYPROCESSES
366
Example2:GeneralLinearProcesses Fromthesimplebuildingblockprovidedbywhitenoise,
wecanconstruct averyflexiblefamilyofcovariancestationaryprocesses— thegenerallinear
processes
X
t
=
¥
å
j=0
y
j
e
t j
,
t2Z
(3.83)
where
• fe
t
giswhitenoise
• fy
t
gisasquaresummablesequenceinR(thatis,
å
¥
t=0
y
2
t
<¥)
Thesequencefy
t
gisoftencalledalinearfilter
Withsomemanipulationsitispossibletoconfirmthattheautocovariancefunctionfor(3.83)is
g(k)=s
2
¥
å
j=0
y
j
y
j+k
(3.84)
BytheCauchy-Schwartzinequalityonecanshowthatthelastexpressionisfinite.Clearlyitdoes
notdependont
Wold’sDecomposition Remarkably,theclassofgenerallinearprocessesgoesalongwayto-
wardsdescribingtheentireclassofzero-meancovariancestationaryprocesses
Inparticular,Wold’stheoremstatesthateveryzero-meancovariancestationaryprocessfX
t
gcan
bewrittenas
X
t
=
¥
å
j=0
y
j
e
t j
+h
t
where
• fe
t
giswhitenoise
• fy
t
gissquaresummable
• h
t
canbeexpressedasalinearfunctionofX
1
,X
2
,...andisperfectlypredictableover
arbitrarilylonghorizons
Forintuitionandfurtherdiscussion,see[Sar87],p.286
ARandMA
Generallinearprocessesareaverybroadclassofprocesses,anditoftenpaysto
specializetothoseforwhichthereexistsarepresentationhavingonlyfinitelymanyparameters
(Infact, experienceshowsthatmodelswitharelativelysmallnumber ofparameterstypically
performbetterthanlargermodels,especiallyforforecasting)
OneverysimpleexampleofsuchamodelistheAR(1)process
X
t
=fX
1
+e
t
where jfj<1 andfe
t
giswhitenoise
(3.85)
Bydirectsubstitution,itiseasytoverifythatX
t
=
å
¥
j=0
f
j
e
t j
HencefX
t
gisagenerallinearprocess
T
HOMAS
S
ARGENTAND
J
OHN
S
TACHURSKI
April20,2016
3.8. COVARIANCESTATIONARYPROCESSES
367
Applying(3.84)tothepreviousexpressionforX
t
,wegettheAR(1)autocovariancefunction
g(k)=f
k
s
2
f2
,
k=0,1,...
(3.86)
Thenextfigureplotsthisfunctionforf=0.8andf0.8withs=1
AnotherverysimpleprocessistheMA(1)process
X
t
=e
t
+qe
1
Youwillbeabletoverifythat
g(0)=s
2
(1+q
2
)g(1)=s
2
q, and g(k)=8k>1
TheAR(1)canbegeneralizedtoanAR(p)andlikewisefortheMA(1)
Puttingallofthistogether,wegetthe
ARMAProcesses AstochasticprocessfX
t
giscalledanautoregressivemovingaverageprocess,or
ARMA(p,q),ifitcanbewrittenas
X
t
=f
1
X
1
++f
p
X
t p
+e
t
+q
1
e
1
++q
q
e
t q
(3.87)
wherefe
t
giswhitenoise
ThereisanalternativenotationforARMAprocessesincommonuse,basedaroundthelagoperator
L
Def.GivenarbitraryvariableY
t
,letL
k
Y
t
:=Y
t k
Itturnsoutthat
• lagoperatorscanleadtoverysuccinctexpressionsforlinearstochasticprocesses
T
HOMAS
S
ARGENTAND
J
OHN
S
TACHURSKI
April20,2016
3.8. COVARIANCESTATIONARYPROCESSES
368
• algebraicmanipulationstreatingthelagoperatorasanordinaryscalaroftenarelegitimate
UsingL,wecanrewrite(3.87)as
L
0
X
t
f
1
L
1
X
t
 f
p
L
p
X
t
=L
0
e
t
+q
1
L
1
e
t
++q
q
L
q
e
t
(3.88)
Ifweletf(z)andq(z)bethepolynomials
f(z):=f
1
 f
p
z
p
and q(z):=1+q
1
z++q
q
z
q
(3.89)
then(3.88)simplifiesfurtherto
f(L)X
t
=q(L)e
t
(3.90)
Inwhatfollowswealwaysassumethattherootsofthepolynomialf(z)lieoutsidetheunitcircle
inthecomplexplane
ThisconditionissufficienttoguaranteethattheARMA(p,q)processisconvariancestationary
Infactitimpliesthattheprocessfallswithintheclassofgenerallinearprocessesdescribedabove
Thatis,givenanARMA(p,q)processfX
t
gsatisfyingtheunitcirclecondition,thereexistsasquare
summablesequencefy
t
gwithX
t
=
å
¥
j=0
y
j
e
t j
forallt
Thesequencefy
t
gcanbeobtainedbyarecursiveprocedureoutlinedonpage79of[CC08]
Inthiscontext,thefunctiont7!y
t
isoftencalledtheimpulseresponsefunction
SpectralAnalysis
Autocovariancefunctionsprovideagreat dealofinfomationabout covariancestationarypro-
cesses
Infact, forzero-meanGaussianprocesses,theautocovariancefunctioncharacterizestheentire
jointdistribution
Evenfornon-Gaussianprocesses,itprovidesasignificantamountofinformation
Itturnsoutthatthereisanalternativerepresentationoftheautocovariancefunctionofacovari-
ancestationaryprocess,calledthespectraldensity
Attimes, thespectraldensityiseasiertoderive,easiertomanipulateandprovidesadditional
intuition
ComplexNumbers Beforediscussingthespectraldensity,weinviteyoutorecallthemainprop-
ertiesofcomplexnumbers(orskiptothenextsection)
Itcanbehelpfultorememberthat,inaformalsense,complexnumbersarejustpoints(x,y)2R
2
endowedwithaspecificnotionofmultiplication
When(x,y)isregardedasacomplexnumber,xiscalledtherealpartandyiscalledtheimaginary
part
Themodulusorabsolutevalueofacomplexnumberz=(x,y)isjustitsEuclideannorminR
2
,but
isusuallywrittenasjzjinsteadofkzk
T
HOMAS
S
ARGENTAND
J
OHN
S
TACHURSKI
April20,2016
3.8. COVARIANCESTATIONARYPROCESSES
369
Theproductoftwocomplexnumbers(x,y)and(u,v)isdefinedtobe(xu vy,xv+yu),while
additionisstandardpointwisevectoraddition
Whenendowedwiththesenotionsofmultiplicationandaddition,thesetofcomplexnumbers
formsafield—additionandmultiplicationplaywelltogether,justastheydoinR
Thecomplexnumber(x,y)isoftenwrittenasx+iy,whereiiscalledtheimaginaryunit,andis
understoodtoobeyi
=
1
Thex+iynotationcanbethoughtofasaneasywaytorememberthedefinitionofmultiplication
givenabove,because,proceedingnaively,
(x+iy)(u+iv)=xu yv+i(xv+yu)
Convertedbacktoourfirstnotation,thisbecomes(xu vy,xv+yu),whichisthesameasthe
productof(x,y)and(u,v)fromourpreviousdefinition
Complexnumbersarealsosometimesexpressedintheirpolarformre
iw
,whichshouldbeinter-
pretedas
re
iw
:=r(cos(w)+isin(w))
SpectralDensities LetfX
t
gbeacovariancestationaryprocesswithautocovariancefunctiong
satisfying
å
k
g(k)
<
¥
ThespectraldensityfoffX
t
gisdefinedasthediscretetimeFouriertransformofitsautocovariance
functiong
f(w):=
å
k2Z
g(k)e
iwk
,
w2R
(Someauthorsnormalizetheexpressionontherightbyconstantssuchas1/p— thechosen
conventionmakeslittledifferenceprovidedyouareconsistent)
Usingthefactthatgiseven,inthesensethatg(t)=gt)forallt,youshouldbeabletoshow
that
f(w)=g(0)+2
å
k1
g(k)cos(wk)
(3.91)
Itisnotdifficulttoconfirmthat fis
• real-valued
• even(f(w)=fw)),and
• 2p-periodic,inthesensethatf(2p+w)=f(w)forallw
Itfollowsthatthevaluesof on[0,p]determinethevaluesof onallofR—theproofisan
exercise
Forthisreasonitisstandardtoplotthespectraldensityonlyontheinterval[0,p]
Example1:WhiteNoise Considerawhitenoiseprocessfe
t
gwithstandarddeviations
Itissimpletocheckthatinthiscasewehavef(w)=s
2
.Inparticular,fisaconstantfunction
Aswewillsee,thiscanbeinterpretedasmeaningthat“allfrequenciesareequallypresent”
T
HOMAS
S
ARGENTAND
J
OHN
S
TACHURSKI
April20,2016
3.8. COVARIANCESTATIONARYPROCESSES
370
(Whitelighthasthispropertywhenfrequencyreferstothevisiblespectrum,aconnectionthat
providestheoriginsoftheterm“whitenoise”)
Example2: ARand:index‘MA‘andARMA ItisanexercisetoshowthattheMA(1)process
X
t
=qe
1
+e
t
hasspectraldensity
f(w)=s
2
(1+2qcos(w)+q
2
)
(3.92)
Withabitmoreeffort,it’spossibletoshow(see,e.g.,p.261of[Sar87])thatthespectraldensityof
theAR(1)processX
t
=fX
1
+e
t
is
f(w)=
s
2
1 2fcos(w)+f2
(3.93)
Moregenerally,itcanbeshownthatthespectraldensityoftheARMAprocess(3.87)is
f(w)=
q(e
iw)
f(eiw)
2
s
2
(3.94)
where
• sisthestandarddeviationofthewhitenoiseprocessfe
t
g
• thepolynomialsf()andq()areasdefinedin(3.89)
Thederivationof(3.94)usesthefactthatconvolutionsbecomeproductsunderFouriertransfor-
mations
Theproofiselegantandcanbefoundinmanyplaces—see,forexample,[Sar87],chapter11,
section4
It’saniceexercisetoverifythat(3.92)and(3.93)areindeedspecialcasesof(3.94)
InterpretingtheSpectralDensity Plotting(3.93)revealstheshapeofthespectraldensityforthe
AR(1)modelwhenftakesthevalues0.8and-0.8respectively
ThesespectraldensitiescorrespondtotheautocovariancefunctionsfortheAR(1)processshown
above
Informally,wethinkofthespectraldensityasbeinglargeatthosew2[0,p]suchthattheautoco-
variancefunctionexhibitssignificantcyclesatthis“frequency”
Toseetheidea,let’sconsiderwhy,inthelowerpaneloftheprecedingfigure,thespectraldensity
forthecasef0.8islargeatw=p
Recallthatthespectraldensitycanbeexpressedas
f(w)=g(0)+2
å
k1
g(k)cos(wk)=g(0)+2
å
k1
0.8)
k
cos(wk)
(3.95)
Whenweevaluatethisat=p,wegetalargenumberbecausecos(pk)islargeandpositive
when0.8)
k
ispositive,andlargeinabsolutevalueandnegativewhen0.8)
k
isnegative
T
HOMAS
S
ARGENTAND
J
OHN
S
TACHURSKI
April20,2016
Documents you may be interested
Documents you may be interested