Learn R Programming

TickExec (version 1.1)

SimpleReturn: Calculate Simple Price to Price Return

Description

Used to calculate close-to-close, open-to-close, etc, returns from given price matrices. Duration can be 0 or any positive integers.

Usage

SimpleReturn(priceFrom, priceTo, diff = 0)

Arguments

priceFrom
A matrix with the beginning prices.
priceTo
A matrix with the ending prices.
diff
Number of rows for the two matrices' dislocation.

Value

A matrix, of corresponding returns.