Learn R Programming

highfrequency (version 0.5.3)

rScatterReturns: Scatterplot of aligned returns

Description

Creates a scatterplot of cross returns.

Usage

rScatterReturns(x,y, period, align.by="seconds", align.period=1,
   numbers=FALSE,xlim= NULL, ylim=NULL, 
  plotit=TRUE, pch=NULL, cts=TRUE, makeReturns=FALSE, 
   scale.size=0, col.change=FALSE,...)

Arguments

x

Tick data in xts object.

y

Tick data in xts object.

period

Sampling period

align.by

Align the tick data to seconds|minutes|hours

align.period

Align the returns to this period first

cts

Create calendar time sampling if a non realizedObject is passed

makeReturns

Prices are passed make them into log returns

plotit

T for plot

numbers

T for count

pch

type of point

ylim

ylimit

xlim

xlimit

scale.size

.

col.change

.

...

...

Details

Scatterplot of returns.

References

S. W. Payseur. A One Day Comparison of Realized Variance and Covariance Estimators. Working Paper: University of Washington, 2007

Examples

Run this code
# NOT RUN {
data(sbux.xts)
data(lltc.xts)
par(mfrow=c(2,1))
rScatterReturns(sbux.xts,y=lltc.xts, period=1, align.period=20,
    ylab="LLTC",xlab="SBUX",numbers=FALSE) 
rScatterReturns(sbux.xts,y=lltc.xts, period=1, align.period=20,
   ylab="LLTC",xlab="SBUX",numbers=TRUE) 
# }

Run the code above in your browser using DataLab