z.value: Z-score comparison

View source: R/z_score.R

z.valueR Documentation

Z-score comparison

Description

A function that makes comparison between the z-value of two stocks, in a monthly time frame. The value of the z-score shows how many standard deviations there are away from the mean. It has been calculated using the difference between the return of each ticket and its mean, divided by its standard deviation.

Usage

z.value(ticker, from, to)

Arguments

ticker

A character vector of length two storing tickers of the stocks of which you want the z-score Note that since data are downloaded from Yahoo finance, the ticker should be the same as the ones reported on Yahoo finance. See examples.

from

A single character variable storing the starting date from which we want to download the data. The format should be "yyyy-mm-dd"

to

A single character variable storing the ending date from which we want to download the data. The format should be "yyyy-mm-dd"

Examples

## Not run:  
z.value(c("AAPL",  "MSFT"), from = "2020-01-01", to = "2021-06-06")

## End(Not run)


gabrielebonvicini/plotFin documentation built on Oct. 11, 2023, 1:36 a.m.