Package matiming. September 8, 2017
|
|
- Baldwin Matthews
- 5 years ago
- Views:
Transcription
1 Type Package Title Market Timing with Moving Averages Version 1.0 Author Valeriy Zakamulin Package matiming September 8, 2017 Maintainer Valeriy Zakamulin This package contains functions to compute moving averages, simulate moving average trading strategies, and to perform back-tests and forward tests of these strategies. License GPL-3 LazyData TRUE Depends R (>= 2.10) Imports Rcpp (>= ), zoo, np, e1071 LinkingTo Rcpp RoxygenNote NeedsCompilation yes Archs i386, x64 R topics documented: back.test best.is.strategies descriptive.statistics djia.daily djia.monthly DMA EMA Excret forward.test HMA is.outperformance.plot LMA oos.outperformance.plot outperformance.test Sharpe sim.cdir.strategy
2 2 back.test sim.mac.strategy sim.macd.strategy sim.mae.strategy sim.mom.strategy sim.results.merge SMA Sortino sp500.daily sp500.monthly ZMA Index 28 back.test Finds the optimal trading strategies in a back-test (in-sample test) This function finds the optimal trading strategies in a back-test back.test(results, start.date, end.date, n.first=7, include.bh=false, FUN=Sharpe) results start.date end.date n.first include.bh FUN the results of simulation of a trading strategy or multiple trading strategies. Specifically, this is the result returned by function sim.mom.strategy, sim.mac.strategy, sim.cdir.strategy, sim.macd.strategy, or sim.results.merge the start of the in-sample period the end of the in-sample period the (maximum) number of the best performing strategies in the returned object a logical value indicating whether to consider the Buy-and-Hold (bh) strategy in addition to the moving average strategies the function that computes the performance of a trading strategy. An object to be used by other functions Note The argument results contains the dates vector that defines the historical period over which the trading strategies are simulated. The function FUN is either Excret, Sharpe, or Sortino. Other strategy testing functions: forward.test, outperformance.test
3 best.is.strategies 3 Examples ## Not run: library(matiming) library(xtable) library(zoo) # access the data data <- sp500.monthly dates <- index(data) data <- coredata(data) capret <- data[,"cap"] totret <- data[,"tot"] rfret <- data[,"rf"] # simulate the trading strategies tc < fast <- 1:5 slow <- 2:15 shorts <- F results <- sim.mac.strategy(totret=totret, rfret=rfret, dates=dates, capret=capret, tc=tc, shorts=shorts, fast=fast, slow=slow, FUN=SMA) # define the historical period start.date <- as.date(" ", format="%y-%m-%d") end.date <- as.date(" ", format="%y-%m-%d") n.first <- 5 include.bh <- TRUE res <- back.test(results, start.date=start.date, end.date=end.date, n.first=n.first, include.bh=include.bh, FUN=Sortino) # print out the ranking of trading strategies df <- best.is.strategies(res, to.annual=sqrt(12), plot.results=true) xtab <- xtable(df, digits=3) print(xtab, include.rownames=false) ## End(Not run) best.is.strategies Reports the best trading strategies in a back-test (in-sample test) This function reports the best trading strategies in a back-test best.is.strategies(results, to.annual=sqrt(12), plot.results=false) results to.annual plot.results the results returned by function back.test a coefficient used to annualize the performance measure. For example, when the performance is measured using either Sharpe or Sortino, use sqrt(252) and sqrt(12) when the returns are at the daily and monthly frequency respectively. If the performance is measred by Excret, use 12 a logical value indicating whether to plot the cumulative returns to the best trading strategies and to the buy-and-hold strategy
4 4 descriptive.statistics An object of class data.frame containing three columns: Rank, Rule, and Performance. Other strategy summary functions: descriptive.statistics Examples ## Not run: library(matiming) library(xtable) library(zoo) data <- sp500.monthly dates <- index(data) data <- coredata(data) capret <- data[,"cap"] totret <- data[,"tot"] rfret <- data[,"rf"] tc < fast <- 1:9 slow <- 2:18 res.mac <- sim.mac.strategy(totret=totret, rfret=rfret, dates=dates, capret=capret, tc=tc, fast=fast, slow=slow, FUN=SMA) res.mom <- sim.mom.strategy(totret=totret, rfret=rfret, dates=dates, capret=capret, tc=tc, winsize=slow) results <- sim.results.merge(res.mac, res.mom) start.date <- as.date(" ", format="%y-%m-%d") end.date <- as.date(" ", format="%y-%m-%d") n.first <- 10 include.bh <- TRUE res <- back.test(results, start.date=start.date, end.date=end.date, n.first=n.first, include.bh=include.bh, FUN=Sharpe) df <- best.is.strategies(res, plot.results=true) xtab <- xtable(df, digits=3) print(xtab, include.rownames=false) ## End(Not run) descriptive.statistics Computes the summary statistics of the moving average trading strategy and the corresponding buy-and-hold strategy
5 descriptive.statistics 5 This function computes the summary statistics of the moving average trading strategy and the corresponding buy-and-hold strategy descriptive.statistics(results, nobs.a.year = 12, to.annual=sqrt(12), type=c("ordinary", "block", "stationary"), blen=5, R=1000, automatic=false, plot.results=false) results nobs.a.year to.annual type blen R automatic plot.results the results returned by function forward.test or back.test a scalar that defines the number of observations a year. For example, for monthly data the number of observations a year equals 12 a coefficient used to annualize the performance measure. For example, when the performance is measured using either Sharpe or Sortino, use sqrt(252) and sqrt(12) when the returns are at the daily and monthly frequency respectively. If the performance is measred by Excret, use 12 determines the type of the bootstrap method. The default type is "ordinary" (the method of Efron, 1979). The two other types are "block" (the method of Kunsch, 1989) and "stationary" (the method of Politis and Romano, 1994) a scalar that specifies the block length in the block-bootstrap method a scalar that specifies the number of bootstrap replicates a logical variable that specifies whether to compute the optimal block length for the block-bootstrap and stationary bootstrap a logical value indicating whether to plot the cumulative returns and drawdowns to the moving average strategy and the buy-and-hold strategy An object of class data.frame containing two columns: BH and MA. The first column contains the summary statistics for the Buy-and-Hold strategy, the second column contains the summary statistics for the Moving Average strategy. Each column contains the following rows: Mean returns annualized mean returns Std. deviation annualized standard deviation Minimum return minimum return Maximum return maximum return Skewness skewness of return distribution Kurtosis kurtosis of return distribution Average drawdown Average drawdown Average max drawdown Average of the 10 largest drawdowns Maximum drawdown Maximum drawdown Performance Performance measure P-value P-value of the test of outperformance Rolling 5-year Win Probability that the moving average strategy outperforms its passive counterpart over a 5-year horizon Rolling 10-year Win Probability that the moving average strategy outperforms its passive counterpart over a 10-year horizon
6 6 descriptive.statistics Note The length of the tested period should be longer than 10 years (this is needed to compute the Rolling 10-year Win). P-value is the p-value of the outperformance test. This p-value is computed in the same manner as in function outperformance.test. If results are produced by back.test, then this function computes the descriptive statistics and the p-value of the best strategy in the back test. In this case the p-value is not adjusted for the data-mining bias; hence, this p-value is unreliable. Otherwise, if results are produced by forward.test, then this function computes the descriptive statistics and the p-value of the out-of-sample strategy. Other strategy summary functions: best.is.strategies Examples ## Not run: library(matiming) library(xtable) library(zoo) data <- sp500.monthly dates <- index(data) data <- coredata(data) capret <- data[,"cap"] totret <- data[,"tot"] rfret <- data[,"rf"] tc < fast <- 1:9 slow <- 2:18 res.mac <- sim.mac.strategy(totret=totret, rfret=rfret, dates=dates, capret=capret, tc=tc, fast=fast, slow=slow, FUN=SMA) res.mom <- sim.mom.strategy(totret=totret, rfret=rfret, dates=dates, capret=capret, tc=tc, winsize=slow) results <- sim.results.merge(res.mac, res.mom) start.date <- as.date(" ", format="%y-%m-%d") end.is.date <- as.date(" ", format="%y-%m-%d") end.oos.date <- as.date(" ", format="%y-%m-%d") refit.every <- 1 rolling <- FALSE res <- forward.test(results, start.date, end.is.date, end.oos.date, refit.every=refit.every, rolling=rolling, FUN=Sharpe) df <- descriptive.statistics(res, plot.results=true) xtab <- xtable(df, digits=2) print(xtab) ## End(Not run)
7 djia.daily 7 djia.daily Daily returns of the Dow Jones Industrial Average index Format The daily returns of the DJIA index and the risk-free rate of return over the period from July 1926 to December 2015 djia.daily An object of class "zoo" containing the following variables: TOT total return (capital gain plus dividend yield) CAP capital gain return RF risk-free rate of return Other data sets: djia.monthly, sp500.daily, sp500.monthly djia.monthly Monthly returns of the Dow Jones Industrial Average index Format The monthly returns of the DJIA index and the risk-free rate of return over the period from July 1926 to December 2015 djia.monthly An object of class "zoo" containing the following variables: TOT total return (capital gain plus dividend yield) CAP capital gain return RF risk-free rate of return Other data sets: djia.daily, sp500.daily, sp500.monthly
8 8 EMA DMA Computes the Double Exponential Moving Average (DMA) This function computes the DMA of prices DMA(price, n) price n the vector of prices the length of the averaging window (a scalar) the DMA of prices (a vector) References Mulloy P. G. (1994). Smoothing Data With Faster Moving Averages, Technical Analysis of Stocks and Commodities, 12 (1), Other moving average functions: EMA, HMA, LMA, SMA, ZMA EMA Computes the Exponential Moving Average (EMA) This function computes the infinite EMA of prices EMA(price, n) price n the vector of prices the length of the averaging window (a scalar. the EMA of prices (a vector)
9 Excret 9 Note By definition, n is the length of the averaging window in SMA that has the same average lag time as EMA Other moving average functions: DMA, HMA, LMA, SMA, ZMA Excret Computes the mean excess return This function computes the mean excess return. Excess return is the return in excess of the risk-free rate of return Excret(x) x the vector of excess returns the mean excess return (a scalar) Other performance measures: Sharpe, Sortino forward.test Simulates the returns to the out-of-sample trading strategy This function simulates the returns to the out-of-sample trading strategy forward.test(results, start.date, end.is.date, end.oos.date, refit.every=1, rolling=false, include.bh=false, FUN=Sharpe)
10 10 forward.test results start.date end.is.date end.oos.date refit.every rolling include.bh FUN the results of simulation of a trading strategy or multiple trading strategies. Specifically, this is the result returned by function sim.mom.strategy, sim.mac.strategy, sim.cdir.strategy, sim.macd.strategy, or sim.results.merge the start of the in-sample period the end of the initial in-sample period the end of the out-of-sample period this parameter determines how often the best trading strategy in a back test is determined a logical value indicating whether to use the expanding (if FALSE) or rolling (if TRUE) in-sample window a logical value indicating whether to consider the Buy-and-Hold (bh) strategy in addition to the moving average strategies the function that computes the performance of a trading strategy An object to be used by other functions Note The argument results contains the dates vector that defines the historical period over which the trading strategies are simulated. The function FUN is either Excret, Sharpe, or Sortino. This function only simulates the out-of-sample strategy; to test the outperformance hypothesis, use either function outperformance.test or function descriptive.statistics. Other strategy testing functions: back.test, outperformance.test Examples ## Not run: library(matiming) library(xtable) library(zoo) # access the data data <- sp500.monthly dates <- index(data) data <- coredata(data) capret <- data[,"cap"] totret <- data[,"tot"] rfret <- data[,"rf"] # simulate the trading strategies tc < fast <- 1:5 slow <- 2:15 shorts <- F results <- sim.mac.strategy(totret=totret, rfret=rfret, dates=dates, capret=capret, tc=tc, shorts=shorts, fast=fast, slow=slow, FUN=SMA)
11 HMA 11 # perform the out-of-sample test start.date <- as.date(" ", format="%y-%m-%d") end.is.date <- as.date(" ", format="%y-%m-%d") end.oos.date <- as.date(" ", format="%y-%m-%d") refit.every <- 5 include.bh <- TRUE rolling <- TRUE res <- forward.test(results, start.date=start.date, end.is.date=end.is.date, end.oos.date=end.oos.date, refit.every=refit.every, rolling=rolling, include.bh=include.bh, FUN=Sortino) # report the descriptive statistics and the p-value of the test df <- descriptive.statistics(res) xtab <- xtable(df, digits=2) print(xtab) ## End(Not run) HMA Computes the Hull Moving Average (HMA) This function computes the HMA of prices HMA(price, n) price n the vector of prices the length of the averaging window (a scalar) the HMA of prices (a vector) References Hull, A. (2005). How to Reduce Lag in a Moving Average, Other moving average functions: DMA, EMA, LMA, SMA, ZMA
12 12 is.outperformance.plot is.outperformance.plot Plots the trading strategies rolling outperformance This function plots the trading strategies rolling outperformance is.outperformance.plot(results, start.date, split.date, end.date, FUN=Sharpe) results start.date split.date end.date FUN the results of the back-test or simulation of a trading strategy or multiple trading strategies. The former is the result returned by function back.test. The latter is the result returned by function sim.mom.strategy, sim.mac.strategy, sim.cdir.strategy, sim.macd.strategy, or sim.results.merge the start of the first rolling period the end of the first rolling period the end of the total period the function that computes the performance of a trading strategy. The function FUN is either Excret, Sharpe, or Sortino. Note None The argument results contains the dates vector that defines the historical period over which the trading strategies are simulated. The function FUN is only used if results is the result of simulation. The outperformance is defined as the difference between the performance of a trading strategy and the performance of the corresponding passive strategy. The number of plotted strategies is limited by 5. Other plotting functions: oos.outperformance.plot Examples ## Not run: library(matiming) library(zoo) # access the data data <- sp500.monthly dates <- index(data) data <- coredata(data) capret <- data[,"cap"] totret <- data[,"tot"]
13 LMA 13 rfret <- data[,"rf"] # simulate the SMA(10) strategy tc < fast <- 1 slow <- 10 shorts <- F results <- sim.mac.strategy(totret=totret, rfret=rfret, dates=dates, capret=capret, tc=tc, shorts=shorts, fast=fast, slow=slow, FUN=SMA) # plot the rolling outperformance start.date <- as.date(" ", format="%y-%m-%d") split.date <- as.date(" ", format="%y-%m-%d") end.date <- as.date(" ", format="%y-%m-%d") is.outperformance.plot(results, start.date=start.date, split.date=split.date, end.date=end.date, FUN=Sharpe) ## End(Not run) LMA Computes the Linear Moving Average (LMA) This function computes the LMA of prices LMA(price, n) price n the vector of prices the length of the averaging window (a scalar) the LMA of prices (a vector) Other moving average functions: DMA, EMA, HMA, SMA, ZMA
14 14 oos.outperformance.plot oos.outperformance.plot Plots the rolling outperformance of the OOS strategy This function plots the rolling outperformance of the out-of-sample trading strategy oos.outperformance.plot(results, start.date, split.date, end.date) results start.date split.date end.date the results returned by function forward.test the start of the first rolling period the end of the first rolling period the end of the total period Note None The argument results contains, among other variables, the dates vector that defines the historical period over which the trading strategies are simulated. The outperformance is defined as the difference between the performance of a trading strategy and the performance of the corresponding passive strategy. Other plotting functions: is.outperformance.plot Examples ## Not run: library(matiming) library(zoo) data <- sp500.monthly dates <- index(data) data <- coredata(data) capret <- data[,"cap"] totret <- data[,"tot"] rfret <- data[,"rf"] tc < fast <- 1:9 slow <- 2:18 res.mac <- sim.mac.strategy(totret=totret, rfret=rfret, dates=dates,
15 outperformance.test 15 capret=capret, tc=tc, fast=fast, slow=slow, FUN=SMA) res.mom <- sim.mom.strategy(totret=totret, rfret=rfret, dates=dates, capret=capret, tc=tc, winsize=slow) results <- sim.results.merge(res.mac, res.mom) start.date <- as.date(" ", format="%y-%m-%d") end.is.date <- as.date(" ", format="%y-%m-%d") end.oos.date <- as.date(" ", format="%y-%m-%d") res <- forward.test(results, start.date=start.date, end.is.date=end.is.date, end.oos.date=end.oos.date) # plot the rolling outperformance start.date <- as.date(" ", format="%y-%m-%d") split.date <- as.date(" ", format="%y-%m-%d") end.date <- as.date(" ", format="%y-%m-%d") oos.outperformance.plot(res, start.date=start.date, split.date=split.date, end.date=end.date) ## End(Not run) outperformance.test Tests whether the moving average strategy outperforms its passive counterpart This function tests whether the moving average strategy outperforms its passive counterpart. All tests are based on using a bootstrap method. outperformance.test(results, digits=3, to.annual=sqrt(12), type=c("ordinary", "block","stationary"), blen=5, R=1000, automatic=false) results digits to.annual type blen the results returned by function forward.test or back.test defines the number of digits after the decimal delimiter to use in reporting the performance of the moving average and buy-and-hold strategies a coefficient used to annualize the performance measure. For example, when the performance is measured using either Sharpe or Sortino, use sqrt(252) and sqrt(12) when the returns are at the daily and monthly frequency respectively. If the performance is measred by Excret, use 12 determines the type of the bootstrap method. The default type is "ordinary" (the method of Efron, 1979). The two other types are "block" (the method of Kunsch, 1989) and "stationary" (the method of Politis and Romano, 1994) a scalar that specifies the block length in the block-bootstrap method
16 16 outperformance.test R automatic a scalar that specifies the number of bootstrap replicates a logical variable that specifies whether to compute the optimal block length for the block-bootstrap and stationary bootstrap Note The p-value of the outperformance test. If results are produced by back.test, then this function tests whether the best strategy in the back test outperforms the buy-and-hold strategy. Note that in this case the p-value is not ajdusted for the data-mining bias. Otherwise, if results are produced by forward.test, then this function tests whether the out-of-sample strategy outperforms the buy-and-hold strategy. Regardless of the performance measure used (denoted by P M), this function performs the tests of the following null hypothesis: H 0 : P M MA P M BH, where P M MA is the performance of the moving average strategy and P M BH is the performance of the buy-and-hold strategy. In words, the null hypothesis is that the performance of the moving average strategy is not better than the performance of the buy-and-hold strategy. All tests are based on non-parametric bootstrap methods. The three bootstrap methods that are implemented are: (1) the ordinary bootstrap method of Efron (1979), (2) the block-bootstrap method of Kunsch (1989), and (3) the stationary block-bootstrap method of Politis and Romano (1994). In a block-bootstrap method one needs to either specify manually the block length or to allow the function to automatically determine the optimal block length. The optimal block length is computed using the method described in Patton, Politis and White (2009). To determine the optimal block length, function b.star from package np is used (Hayfield and Racine (2008)). References Efron, B., Bootstrap Methods: Another Look at the Jackknife. Annals of Statistics, 1979, 7, Kunsch, H.R., The Jacknife and the Bootstrap for General Stationary Observations. Annals of Statistics, 1989, 17, Politis, D. and Romano, J., The Stationary Bootstrap. Journal of the American Statistical Association, 1994, 89, Politis, D.N. and H. White (2004), Automatic block-length selection for the dependent bootstrap, Econometric Reviews 23 (1), Patton, A. and D.N. Politis and H. White (2009), CORRECTION TO: Automatic block-length selection for the dependent bootstrap by D. Politis and H. White, Econometric Reviews 28 (4), Hayfield, T. and J. Racine (2008). Nonparametric Econometrics: The np Package. Journal of Statistical Software, 27 (5). Other strategy testing functions: back.test, forward.test Examples # Suppose that "results" are the results of simulations of different trading strategies ## Not run: start.date <- as.date(" ", format="%y-%m-%d")
17 Sharpe 17 end.is.date <- as.date(" ", format="%y-%m-%d") end.oos.date <- as.date(" ", format="%y-%m-%d") refit.every <- 5 include.bh <- TRUE res <- forward.test(results, start.date=start.date, end.is.date=end.is.date, end.oos.date=end.oos.date, refit.every=refit.every, include.bh=include.bh, FUN=Sortino) outperformance.test(res, type="stationary", automatic=true) ## End(Not run) Sharpe Computes the Sharpe ratio This function computes the Sharpe ratio Sharpe(x) x the vector of excess returns the Sharpe ratio (a scalar) References Sharpe, W.F. (1994). The Sharpe Ratio. Journal of Portfolio Management, 21 (1), Other performance measures: Excret, Sortino sim.cdir.strategy Simulates the returns to the Moving Average Change of Direction (CDIR) strategy This function simulates the returns to the CDIR strategy sim.cdir.strategy(totret, rfret, dates, capret=null, tc=0, shorts = FALSE, winsize=200, FUN=SMA)
18 18 sim.cdir.strategy totret rfret dates capret tc shorts winsize FUN the vector of total returns the vector of risk-free returns the vector of dates the vector of capital gain returns the amount of one-way transaction costs (a scalar) a logical value indicating the type of the strategy when a Sell signal is generated. If shorts=false, money is just invested in cash; otherwise, the asset is sold short a vector or a scalar that determines the size of the window used to compute a moving average a function that determines the type of a moving average An object to be used by other functions. This object contains the returns to the simulated strategies and the description of each strategy (the type of a moving average and the sizes of the windows) Note The function FUN is either SMA, LMA, EMA, DMA, HMA or ZMA. The trading signal is computed using the vector of capital gain returns capret. If capret=null, then the trading signal is computed using the vector of total returns totret. If winsize is a vector, then the function simulates a number of trading strategies for all window sizes such that winsize > 1 Other strategy simulation functions: sim.mac.strategy, sim.macd.strategy, sim.mae.strategy, sim.mom.strategy Examples ## Not run: data <- djia.monthly # use the monthly data for DJIA index dates <- index(data) data <- coredata(data) capret <- data[,"cap"] totret <- data[,"tot"] rfret <- data[,"rf"] tc < # this defines 0.25% one-way transaction costs winsize <- 2:15 shorts <- FALSE results <- sim.cdir.strategy(totret=totret, rfret=rfret, dates=dates, capret=capret, tc=tc, shorts=shorts, winsize=winsize, FUN=LMA) ## End(Not run)
19 sim.mac.strategy 19 sim.mac.strategy Simulates the returns to the Moving Average Crossover (MAC) strategy This function simulates the returns to the MAC strategy sim.mac.strategy(totret, rfret, dates, capret=null, tc=0, shorts = FALSE, fast=50, slow=200, FUN=SMA) totret rfret dates capret tc shorts fast slow FUN the vector of total returns the vector of risk-free returns the vector of dates the vector of capital gain returns the amount of one-way transaction costs (a scalar) a logical value indicating the type of the strategy when a Sell signal is generated. If shorts=false, money is just invested in cash; otherwise, the asset is sold short a vector or a scalar that determines the size of the shorter averaging window a vector or a scalar that determines the size of the longer averaging window a function that determines the type of a moving average An object to be used by other functions. This object contains the returns to the simulated strategies and the description of each strategy (the type of a moving average, the sizes of the shorter and the longer windows) Note The function FUN is either SMA, LMA, EMA, DMA, HMA or ZMA. The trading signal is computed using the vector of capital gain returns capret. If capret=null, then the trading signal is computed using the vector of total returns totret. If one of the arguments fast or slow is a vector, then the function simulates a number of trading strategies for all combinations of fast and slow such that fast < slow Other strategy simulation functions: sim.cdir.strategy, sim.macd.strategy, sim.mae.strategy, sim.mom.strategy
20 20 sim.macd.strategy Examples ## Not run: data <- djia.monthly # use the monthly data for DJIA index dates <- index(data) data <- coredata(data) capret <- data[,"cap"] totret <- data[,"tot"] rfret <- data[,"rf"] tc < # this defines 0.25% one-way transaction costs fast <- 1:8 # define the sizes of the fast (shorter) averaging window slow <- 2:15 # define the sizes of the slow (longer) averaging window shorts <- FALSE results <- sim.mac.strategy(totret=totret, rfret=rfret, dates=dates, capret=capret, tc=tc, shorts=shorts, fast=fast, slow=slow, FUN=EMA) ## End(Not run) sim.macd.strategy Simulates the returns to the Moving Average Convergence Divergence (MACD) strategy This function simulates the returns to the MACD strategy sim.macd.strategy(totret, rfret, dates, capret=null, tc=0, shorts = FALSE, fast=12, slow=26, final=9, FUN=EMA) totret rfret dates capret tc shorts fast slow final FUN the vector of total returns the vector of risk-free returns the vector of dates the vector of capital gain returns the amount of one-way transaction costs (a scalar) a logical value indicating the type of the strategy when a Sell signal is generated. If shorts=false, money is just invested in cash; otherwise, the asset is sold short a vector or a scalar that determines the size of the shorter averaging window a vector or a scalar that determines the size of the longer averaging window a vector or a scalar that determines the size of the window for final smoothing a function that determines the type of a moving average An object to be used by other functions. This object contains the returns to the simulated strategies and the description of each strategy (the type of a moving average, the sizes of the shorter and the longer windows, the size of the window for final smoothing)
21 sim.mae.strategy 21 Note The function FUN is either SMA, LMA, EMA, DMA, HMA or ZMA. The trading signal is computed using the vector of capital gain returns capret. If capret=null, then the trading signal is computed using the vector of total returns totret. If one of the arguments fast, slow or final is a vector, then the function simulates a number of trading strategies for all combinations of fast, slow and final such that fast < slow and final > 1. Other strategy simulation functions: sim.cdir.strategy, sim.mac.strategy, sim.mae.strategy, sim.mom.strategy Examples ## Not run: data <- djia.daily # use the daily data for DJIA index dates <- index(data) data <- coredata(data) capret <- data[,"cap"] totret <- data[,"tot"] rfret <- data[,"rf"] tc < # this defines 0.25% one-way transaction costs fast <- 1:15 # define the sizes of the fast (shorter) averaging window slow <- 2:45 # define the sizes of the slow (longer) averaging window final <- 2:20 # defines the sizes of the window for final smoothing shorts <- FALSE results <- sim.macd.strategy(totret=totret, rfret=rfret, dates=dates, capret=capret, tc=tc, shorts=shorts, fast=fast, slow=slow, final=final, FUN=EMA) ## End(Not run) sim.mae.strategy Simulates the returns to the Moving Average Envelope (MAE) strategy This function simulates the returns to the MAE strategy sim.mae.strategy(totret, rfret, dates, capret=null, tc=0, shorts = FALSE, winsize=200, percentage=1, FUN=SMA) totret rfret dates capret tc the vector of total returns the vector of risk-free returns the vector of dates the vector of capital gain returns the amount of one-way transaction costs (a scalar)
22 22 sim.mom.strategy shorts winsize percentage FUN a logical value indicating the type of the strategy when a Sell signal is generated. If shorts=false, money is just invested in cash; otherwise, the asset is sold short a vector or a scalar that determines the size of the averaging window a vector or a scalar that determines the envelope percentage a function that determines the type of a moving average An object to be used by other functions. This object contains the returns to the simulated strategies and the description of each strategy (the type of a moving average, the sizes of the averaging windows, and the envelope percentages) Note The function FUN is either SMA, LMA, EMA, DMA, HMA or ZMA. The trading signal is computed using the vector of capital gain returns capret. If capret=null, then the trading signal is computed using the vector of total returns totret. Other strategy simulation functions: sim.cdir.strategy, sim.mac.strategy, sim.macd.strategy, sim.mom.strategy Examples ## Not run: data <- djia.monthly # use the monthly data for DJIA index dates <- index(data) data <- coredata(data) capret <- data[,"cap"] totret <- data[,"tot"] rfret <- data[,"rf"] tc < # this defines 0.25% one-way transaction costs winsize <- 2:20 percentage <- 0:10 shorts <- FALSE results <- sim.mae.strategy(totret=totret, rfret=rfret, dates=dates, capret=capret, tc=tc, winsize=winsize, percentage=percentage, slow=slow, FUN=EMA) ## End(Not run) sim.mom.strategy Simulates the returns to the Momentum (MOM) strategy This function simulates the returns to the MOM strategy
23 sim.mom.strategy 23 sim.mom.strategy(totret, rfret, dates, capret=null, tc=0, shorts = FALSE, winsize=200) totret rfret dates capret tc shorts winsize the vector of total returns the vector of risk-free returns the vector of dates the vector of capital gain returns the amount of one-way transaction costs (a scalar) a logical value indicating the type of the strategy when a Sell signal is generated. If shorts=false, money is just invested in cash; otherwise, the asset is sold short a vector or a scalar that determines the size of the window used to compute the MOM An object to be used by other functions. This object contains the returns to the simulated strategies and the description of each strategy Note The trading signal is computed using the vector of capital gain returns capret. If capret=null, then the trading signal is computed using the vector of total returns totret. If winsize is a vector, then the function simulates a number of trading strategies for all window sizes such that winsize > 1 Other strategy simulation functions: sim.cdir.strategy, sim.mac.strategy, sim.macd.strategy, sim.mae.strategy Examples ## Not run: data <- djia.monthly # use the monthly data for DJIA index dates <- index(data) data <- coredata(data) capret <- data[,"cap"] totret <- data[,"tot"] rfret <- data[,"rf"] tc < # this defines 0.25% one-way transaction costs winsize <- 2:15 shorts <- FALSE results <- sim.mom.strategy(totret=totret, rfret=rfret, dates=dates, capret=capret, tc=tc, shorts=shorts, winsize=winsize) ## End(Not run)
24 24 SMA sim.results.merge Merges the results of simulating the returns to different trading strategies This function merges the results of simulating the returns to different trading strategies sim.results.merge(x, y,...) x y the result of simulation of a trading strategy. Specifically, this is the result returned by function sim.mom.strategy, sim.mac.strategy, sim.cdir.strategy, or sim.macd.strategy the result of simulation of another trading strategy. Again, this is the result returned by function sim.mom.strategy, sim.mac.strategy, sim.cdir.strategy, or sim.macd.strategy... other possible results of simulations if more than two results must be merged An object to be used by other functions. This object is a result of merging two or multiple results of simulating the returns to different trading strategies Examples # Suppose that "res1", "res2", and "res3" are the results of simulations of # three different trading strategies. The following command merges the three results ## Not run: results <- sim.results.merge(res1, res2, res3) ## End(Not run) SMA Computes the Simple Moving Average (SMA) This function computes the SMA of prices SMA(price, n) price n the vector of prices the length of the averaging window (a scalar)
25 Sortino 25 the SMA of prices (a vector) Other moving average functions: DMA, EMA, HMA, LMA, ZMA Sortino Computes the Sortino ratio This function computes the Sortino ratio Sortino(x) x the vector of excess returns the Sortino ratio (a scalar) References Sortino, F.A. and Price, L.N. (1994). Performance measurement in a downside risk framework. Journal of Investing, 3 (3), Other performance measures: Excret, Sharpe sp500.daily Daily returns of the Standard and Poor s Composite index The daily returns of the S&P Composite index and the risk-free rate of return over the period from July 1926 to December 2015 sp500.daily
26 26 ZMA Format An object of class "zoo" containing the following variables: TOT total return (capital gain plus dividend yield) CAP capital gain return RF risk-free rate of return Other data sets: djia.daily, djia.monthly, sp500.monthly sp500.monthly Monthly returns of the Standard and Poor s Composite index Format The monthly returns of the S&P Composite index and the risk-free rate of return over the period from January 1857 to December 2015 sp500.monthly An object of class "zoo" containing the following variables: TOT total return (capital gain plus dividend yield) CAP capital gain return RF risk-free rate of return Other data sets: djia.daily, djia.monthly, sp500.daily ZMA Computes the Zero Lag Exponential Moving Average (ZMA) This function computes the ZMA of prices ZMA(price, n) price n the vector of prices the length of the averaging window (a scalar)
27 ZMA 27 the ZMA of prices (a vector) References Ehlers J. F. and Way R. (2010). Zero Lag (Well, Almost), Technical Analysis of Stocks and Commodities, 28 (12), Other moving average functions: DMA, EMA, HMA, LMA, SMA
28 Index back.test, 2, 3, 5, 6, 10, 12, 15, 16 best.is.strategies, 3, 6 descriptive.statistics, 4, 4, 10 djia.daily, 7, 7, 26 djia.monthly, 7, 7, 26 DMA, 8, 9, 11, 13, 18, 19, 21, 22, 25, 27 EMA, 8, 8, 11, 13, 18, 19, 21, 22, 25, 27 Excret, 2, 3, 5, 9, 10, 12, 15, 17, 25 forward.test, 2, 5, 6, 9, HMA, 8, 9, 11, 13, 18, 19, 21, 22, 25, 27 is.outperformance.plot, 12, 14 LMA, 8, 9, 11, 13, 18, 19, 21, 22, 25, 27 oos.outperformance.plot, 12, 14 outperformance.test, 2, 6, 10, 15 Sharpe, 2, 3, 5, 9, 10, 12, 15, 17, 25 sim.cdir.strategy, 2, 10, 12, 17, 19, sim.mac.strategy, 2, 10, 12, 18, 19, sim.macd.strategy, 2, 10, 12, 18, 19, 20, sim.mae.strategy, 18, 19, 21, 21, 23 sim.mom.strategy, 2, 10, 12, 18, 19, 21, 22, 22, 24 sim.results.merge, 2, 10, 12, 24 SMA, 8, 9, 11, 13, 18, 19, 21, 22, 24, 27 Sortino, 2, 3, 5, 9, 10, 12, 15, 17, 25 sp500.daily, 7, 25, 26 sp500.monthly, 7, 26, 26 ZMA, 8, 9, 11, 13, 18, 19, 21, 22, 25, 26 28
Package bbdetection. September 8, 2017
Type Package Package bbdetection September 8, 2017 Title Identification of Bull and Bear States of the Market Version 1.0 Author Valeriy Zakamulin Maintainer Valeriy Zakamulin The package
More informationMarket Timing With a Robust Moving Average
Market Timing With a Robust Moving Average Valeriy Zakamulin This revision: May 29, 2015 Abstract In this paper we entertain a method of finding the most robust moving average weighting scheme to use for
More informationInternet Appendix for Asymmetry in Stock Comovements: An Entropy Approach
Internet Appendix for Asymmetry in Stock Comovements: An Entropy Approach Lei Jiang Tsinghua University Ke Wu Renmin University of China Guofu Zhou Washington University in St. Louis August 2017 Jiang,
More informationTiming the US Stock Market Using Moving Averages and Momentum Rules: An Extensive Study
Timing the US Stock Market Using Moving Averages and Momentum Rules: An Extensive Study HÅVARD LØSETH MODELL LARS MAGNUS LYNNGÅRD SUPERVISOR Valeriy Zakamulin University of Agder, 2017 School of Business
More informationMarket Timing with Moving Averages: The Anatomy and Performance of Trading Rules
Market Timing with Moving Averages: The Anatomy and Performance of Trading Rules Valeriy Zakamulin 1 This revision: September 7, 2017 1 School of Business and Law, University of Agder, Service Box 422,
More informationMoving Averages, CrossOvers and the MACD
Moving Averages, CrossOvers and the MACD October 14, 2017 Introduction: Moving averages are the most widely used indicators in technical analysis, and help smoothing out short-term fluctuations (or volatility)
More informationTrue Performance of Market Timing with Simple Moving Average
True Performance of Market Timing with Simple Moving Average Jakob Ask Supervisor Valeriy Zakamulin This master s thesis is carried out as a part of the education at the University of Agder and is therefore
More information5 Moving Average Signals That Beat Buy And Hold: Backtested Stock Market Signals By Steve Burns, Holly Burns
5 Moving Average Signals That Beat Buy And Hold: Backtested Stock Market Signals By Steve Burns, Holly Burns This is best made clear by the following illustration: In this model, we generally have one
More informationNew financial analysis tools at CARMA
New financial analysis tools at CARMA Amir Salehipour CARMA, The University of Newcastle Joint work with Jonathan M. Borwein, David H. Bailey and Marcos López de Prado November 13, 2015 Table of Contents
More informationDazStat. Introduction. Installation. DazStat is an Excel add-in for Excel 2003 and Excel 2007.
DazStat Introduction DazStat is an Excel add-in for Excel 2003 and Excel 2007. DazStat is one of a series of Daz add-ins that are planned to provide increasingly sophisticated analytical functions particularly
More informationPackage Strategy. R topics documented: August 24, Type Package
Type Package Package Strategy August 24, 2017 Title Generic Framework to Analyze Trading Strategies Version 1.0.1 Date 2017-08-21 Author Julian Busch Maintainer Julian Busch Depends R (>=
More informationPackage eesim. June 3, 2017
Type Package Package eesim June 3, 2017 Title Simulate and Evaluate Time Series for Environmental Epidemiology Version 0.1.0 Date 2017-06-02 Provides functions to create simulated time series of environmental
More informationTuomo Lampinen Silicon Cloud Technologies LLC
Tuomo Lampinen Silicon Cloud Technologies LLC www.portfoliovisualizer.com Background and Motivation Portfolio Visualizer Tools for Investors Overview of tools and related theoretical background Investment
More informationFutures Trading Signal using an Adaptive Algorithm Technical Analysis Indicator, Adjustable Moving Average'
Futures Trading Signal using an Adaptive Algorithm Technical Analysis Indicator, Adjustable Moving Average' An Empirical Study on Malaysian Futures Markets Jacinta Chan Phooi M'ng and Rozaimah Zainudin
More informationAsset Allocation with Exchange-Traded Funds: From Passive to Active Management. Felix Goltz
Asset Allocation with Exchange-Traded Funds: From Passive to Active Management Felix Goltz 1. Introduction and Key Concepts 2. Using ETFs in the Core Portfolio so as to design a Customized Allocation Consistent
More informationFinancial Econometrics Jeffrey R. Russell. Midterm 2014 Suggested Solutions. TA: B. B. Deng
Financial Econometrics Jeffrey R. Russell Midterm 2014 Suggested Solutions TA: B. B. Deng Unless otherwise stated, e t is iid N(0,s 2 ) 1. (12 points) Consider the three series y1, y2, y3, and y4. Match
More informationINTRODUCTION TO PORTFOLIO ANALYSIS. Dimensions of Portfolio Performance
INTRODUCTION TO PORTFOLIO ANALYSIS Dimensions of Portfolio Performance Interpretation of Portfolio Returns Portfolio Return Analysis Conclusions About Past Performance Predictions About Future Performance
More informationPackage smam. October 1, 2016
Type Package Title Statistical Modeling of Animal Movements Version 0.3-0 Date 2016-09-02 Package smam October 1, 2016 Author Jun Yan and Vladimir Pozdnyakov
More informationAnatomy of Market Timing with Moving Averages
Anatomy of Market Timing with Moving Averages Valeriy Zakamulin This revision: August 26, 2015 Abstract The underlying concept behind the technical trading indicators based on moving averages of prices
More informationPackage cbinom. June 10, 2018
Package cbinom June 10, 2018 Type Package Title Continuous Analog of a Binomial Distribution Version 1.1 Date 2018-06-09 Author Dan Dalthorp Maintainer Dan Dalthorp Description Implementation
More informationPackage dng. November 22, 2017
Version 0.1.1 Date 2017-11-22 Title Distributions and Gradients Type Package Author Feng Li, Jiayue Zeng Maintainer Jiayue Zeng Depends R (>= 3.0.0) Package dng November 22, 2017 Provides
More informationTwo-Sample T-Test for Non-Inferiority
Chapter 198 Two-Sample T-Test for Non-Inferiority Introduction This procedure provides reports for making inference about the non-inferiority of a treatment mean compared to a control mean from data taken
More informationAsset Allocation Model with Tail Risk Parity
Proceedings of the Asia Pacific Industrial Engineering & Management Systems Conference 2017 Asset Allocation Model with Tail Risk Parity Hirotaka Kato Graduate School of Science and Technology Keio University,
More informationAnchored Momentum. ANCHORED MOMENTUM Compared with the ordinary momentum indicator, the anchored momentum indicator has two important benefits:
INDICATORS Anchored Momentum A centered simple moving average can be used as a reference point when creating technical analysis indicators. Even though a centered simple moving average produces a plot
More informationSWITCHBACK (FOREX) V1.4
SWITCHBACK (FOREX) V1.4 User Manual This manual describes all the parameters in the ctrader cbot. Please read the Switchback Strategy Document for an explanation on how it all works. Last Updated 11/11/2017
More informationThreshold cointegration and nonlinear adjustment between stock prices and dividends
Applied Economics Letters, 2010, 17, 405 410 Threshold cointegration and nonlinear adjustment between stock prices and dividends Vicente Esteve a, * and Marı a A. Prats b a Departmento de Economia Aplicada
More informationVariance clustering. Two motivations, volatility clustering, and implied volatility
Variance modelling The simplest assumption for time series is that variance is constant. Unfortunately that assumption is often violated in actual data. In this lecture we look at the implications of time
More informationBooth School of Business, University of Chicago Business 41202, Spring Quarter 2014, Mr. Ruey S. Tsay. Solutions to Midterm
Booth School of Business, University of Chicago Business 41202, Spring Quarter 2014, Mr. Ruey S. Tsay Solutions to Midterm Problem A: (30 pts) Answer briefly the following questions. Each question has
More informationPerformance of Statistical Arbitrage in Future Markets
Utah State University DigitalCommons@USU All Graduate Plan B and other Reports Graduate Studies 12-2017 Performance of Statistical Arbitrage in Future Markets Shijie Sheng Follow this and additional works
More informationPackage optimstrat. September 10, 2018
Type Package Title Choosing the Sample Strategy Version 1.1 Date 2018-09-04 Package optimstrat September 10, 2018 Author Edgar Bueno Maintainer Edgar Bueno
More informationFinancial Econometrics Jeffrey R. Russell Midterm 2014
Name: Financial Econometrics Jeffrey R. Russell Midterm 2014 You have 2 hours to complete the exam. Use can use a calculator and one side of an 8.5x11 cheat sheet. Try to fit all your work in the space
More informationTwo-Sample T-Test for Superiority by a Margin
Chapter 219 Two-Sample T-Test for Superiority by a Margin Introduction This procedure provides reports for making inference about the superiority of a treatment mean compared to a control mean from data
More informationAre Market Neutral Hedge Funds Really Market Neutral?
Are Market Neutral Hedge Funds Really Market Neutral? Andrew Patton London School of Economics June 2005 1 Background The hedge fund industry has grown from about $50 billion in 1990 to $1 trillion in
More informationVolume 31, Issue 2. The profitability of technical analysis in the Taiwan-U.S. forward foreign exchange market
Volume 31, Issue 2 The profitability of technical analysis in the Taiwan-U.S. forward foreign exchange market Yun-Shan Dai Graduate Institute of International Economics, National Chung Cheng University
More informationManager Comparison Report June 28, Report Created on: July 25, 2013
Manager Comparison Report June 28, 213 Report Created on: July 25, 213 Page 1 of 14 Performance Evaluation Manager Performance Growth of $1 Cumulative Performance & Monthly s 3748 3578 348 3238 368 2898
More informationQuantitative Trading System For The E-mini S&P
AURORA PRO Aurora Pro Automated Trading System Aurora Pro v1.11 For TradeStation 9.1 August 2015 Quantitative Trading System For The E-mini S&P By Capital Evolution LLC Aurora Pro is a quantitative trading
More informationExploiting Long Term Price Dependencies for Trading Strategies
Exploiting Long Term Price Dependencies for Trading Strategies Alexander Galenko The University of Texas at Austin Elmira Popova The University of Texas at Austin Ivilina Popova Texas State University
More informationFinancial Econometrics (FinMetrics04) Time-series Statistics Concepts Exploratory Data Analysis Testing for Normality Empirical VaR
Financial Econometrics (FinMetrics04) Time-series Statistics Concepts Exploratory Data Analysis Testing for Normality Empirical VaR Nelson Mark University of Notre Dame Fall 2017 September 11, 2017 Introduction
More informationShort Term Alpha as a Predictor of Future Mutual Fund Performance
Short Term Alpha as a Predictor of Future Mutual Fund Performance Submitted for Review by the National Association of Active Investment Managers - Wagner Award 2012 - by Michael K. Hartmann, MSAcc, CPA
More informationTesting for the martingale hypothesis in Asian stock prices: a wild bootstrap approach
Testing for the martingale hypothesis in Asian stock prices: a wild bootstrap approach Jae H. Kim Department of Econometrics and Business Statistics Monash University, Caulfield East, VIC 3145, Australia
More informationReal-time Analytics Methodology
New High/Low New High/Low alerts are generated once daily when a stock hits a new 13 Week, 26 Week or 52 Week High/Low. Each second of the trading day, the stock price is compared to its previous 13 Week,
More informationCAES Workshop: Risk Management and Commodity Market Analysis
CAES Workshop: Risk Management and Commodity Market Analysis ARE THE EUROPEAN CARBON MARKETS EFFICIENT? -- UPDATED Speaker: Peter Bell April 12, 2010 UBC Robson Square 1 Brief Thanks, Personal Promotion
More informationState Switching in US Equity Index Returns based on SETAR Model with Kalman Filter Tracking
State Switching in US Equity Index Returns based on SETAR Model with Kalman Filter Tracking Timothy Little, Xiao-Ping Zhang Dept. of Electrical and Computer Engineering Ryerson University 350 Victoria
More informationThe University of Chicago, Booth School of Business Business 41202, Spring Quarter 2009, Mr. Ruey S. Tsay. Solutions to Final Exam
The University of Chicago, Booth School of Business Business 41202, Spring Quarter 2009, Mr. Ruey S. Tsay Solutions to Final Exam Problem A: (42 pts) Answer briefly the following questions. 1. Questions
More informationConsidering Covered Calls. LA Department of Water & Power Employees Retirement System
LA Department of Water & Power Employees Retirement System Pension Consulting Alliance, Inc. Client Name/Logo December 1 2010 G rowth of $100 Considering Covered Calls RATIONALE Growth of U.S. Equities?
More informationFINITE SAMPLE DISTRIBUTIONS OF RISK-RETURN RATIOS
Available Online at ESci Journals Journal of Business and Finance ISSN: 305-185 (Online), 308-7714 (Print) http://www.escijournals.net/jbf FINITE SAMPLE DISTRIBUTIONS OF RISK-RETURN RATIOS Reza Habibi*
More informationPremium Timing with Valuation Ratios
RESEARCH Premium Timing with Valuation Ratios March 2016 Wei Dai, PhD Research The predictability of expected stock returns is an old topic and an important one. While investors may increase expected returns
More informationTime series: Variance modelling
Time series: Variance modelling Bernt Arne Ødegaard 5 October 018 Contents 1 Motivation 1 1.1 Variance clustering.......................... 1 1. Relation to heteroskedasticity.................... 3 1.3
More informationFinancial Economics. Runs Test
Test A simple statistical test of the random-walk theory is a runs test. For daily data, a run is defined as a sequence of days in which the stock price changes in the same direction. For example, consider
More informationPackage PortRisk. R topics documented: November 1, Type Package Title Portfolio Risk Analysis Version Date
Type Package Title Portfolio Risk Analysis Version 1.1.0 Date 2015-10-31 Package PortRisk November 1, 2015 Risk Attribution of a portfolio with Volatility Risk Analysis. License GPL-2 GPL-3 Depends R (>=
More informationWindow Width Selection for L 2 Adjusted Quantile Regression
Window Width Selection for L 2 Adjusted Quantile Regression Yoonsuh Jung, The Ohio State University Steven N. MacEachern, The Ohio State University Yoonkyung Lee, The Ohio State University Technical Report
More informationFinancial Econometrics Review Session Notes 4
Financial Econometrics Review Session Notes 4 February 1, 2011 Contents 1 Historical Volatility 2 2 Exponential Smoothing 3 3 ARCH and GARCH models 5 1 In this review session, we will use the daily S&P
More informationPackage uqr. April 18, 2017
Type Package Title Unconditional Quantile Regression Version 1.0.0 Date 2017-04-18 Package uqr April 18, 2017 Author Stefano Nembrini Maintainer Stefano Nembrini
More informationBacktesting value-at-risk: a comparison between filtered bootstrap and historical simulation
Journal of Risk Model Validation Volume /Number, Winter 1/13 (3 1) Backtesting value-at-risk: a comparison between filtered bootstrap and historical simulation Dario Brandolini Symphonia SGR, Via Gramsci
More informationHidden Markov Models for Financial Market Predictions
Hidden Markov Models for Financial Market Predictions Department of Mathematics and Statistics Youngstown State University Central Spring Sectional Meeting, Michigan State University, March 15 1 Introduction
More informationก ก ก ก ก ก ก. ก (Food Safety Risk Assessment Workshop) 1 : Fundamental ( ก ( NAC 2010)) 2 3 : Excel and Statistics Simulation Software\
ก ก ก ก (Food Safety Risk Assessment Workshop) ก ก ก ก ก ก ก ก 5 1 : Fundamental ( ก 29-30.. 53 ( NAC 2010)) 2 3 : Excel and Statistics Simulation Software\ 1 4 2553 4 5 : Quantitative Risk Modeling Microbial
More informationModelling catastrophic risk in international equity markets: An extreme value approach. JOHN COTTER University College Dublin
Modelling catastrophic risk in international equity markets: An extreme value approach JOHN COTTER University College Dublin Abstract: This letter uses the Block Maxima Extreme Value approach to quantify
More informationSYMBOL INFO INDICATOR
fxbluelabs.com 1. Overview... 2 2. Using the Symbol Info indicator... 3 2.1 Adding the indicator to a chart... 3 2.2 Choosing the symbol... 3 2.3 % change... 3 2.3.1 Change in pips... 4 2.4 High-low range...
More informationAlgorithmic Trading Session 4 Trade Signal Generation II Backtesting. Oliver Steinki, CFA, FRM
Algorithmic Trading Session 4 Trade Signal Generation II Backtesting Oliver Steinki, CFA, FRM Outline Introduction Backtesting Common Pitfalls of Backtesting Statistical Signficance of Backtesting Summary
More informationTECHNICAL ANALYSIS: CONCEPT OR REALITY?
Technical Analysis: Concept Or Reality?... TECHNICAL ANALYSIS: CONCEPT OR REALITY? Muhammad Asad Khan 1, QaiserAman 2 & Noman Khan 3 Abstract The paper investigates the validity of technical analysis tools
More informationInternet Appendix: High Frequency Trading and Extreme Price Movements
Internet Appendix: High Frequency Trading and Extreme Price Movements This appendix includes two parts. First, it reports the results from the sample of EPMs defined as the 99.9 th percentile of raw returns.
More informationTime Diversification under Loss Aversion: A Bootstrap Analysis
Time Diversification under Loss Aversion: A Bootstrap Analysis Wai Mun Fong Department of Finance NUS Business School National University of Singapore Kent Ridge Crescent Singapore 119245 2011 Abstract
More informationWhere Vami 0 = 1000 and Where R N = Return for period N. Vami N = ( 1 + R N ) Vami N-1. Where R I = Return for period I. Average Return = ( S R I ) N
The following section provides a brief description of each statistic used in PerTrac and gives the formula used to calculate each. PerTrac computes annualized statistics based on monthly data, unless Quarterly
More informationHo Ho Quantitative Portfolio Manager, CalPERS
Portfolio Construction and Risk Management under Non-Normality Fiduciary Investors Symposium, Beijing - China October 23 rd 26 th, 2011 Ho Ho Quantitative Portfolio Manager, CalPERS The views expressed
More informationTECHNICAL INDICATORS
TECHNICAL INDICATORS WHY USE INDICATORS? Technical analysis is concerned only with price Technical analysis is grounded in the use and analysis of graphs/charts Based on several key assumptions: Price
More informationMarket Risk Prediction under Long Memory: When VaR is Higher than Expected
Market Risk Prediction under Long Memory: When VaR is Higher than Expected Harald Kinateder Niklas Wagner DekaBank Chair in Finance and Financial Control Passau University 19th International AFIR Colloquium
More informationPARAMETRIC AND NON-PARAMETRIC BOOTSTRAP: A SIMULATION STUDY FOR A LINEAR REGRESSION WITH RESIDUALS FROM A MIXTURE OF LAPLACE DISTRIBUTIONS
PARAMETRIC AND NON-PARAMETRIC BOOTSTRAP: A SIMULATION STUDY FOR A LINEAR REGRESSION WITH RESIDUALS FROM A MIXTURE OF LAPLACE DISTRIBUTIONS Melfi Alrasheedi School of Business, King Faisal University, Saudi
More informationUsing Oscillators & Indicators Properly May 7, Clarify, Simplify & Multiply
Using Oscillators & Indicators Properly May 7, 2016 Clarify, Simplify & Multiply Disclaimer U.S. Government Required Disclaimer Commodity Futures Trading Commission Futures and Options trading has large
More informationJackknife Empirical Likelihood Inferences for the Skewness and Kurtosis
Georgia State University ScholarWorks @ Georgia State University Mathematics Theses Department of Mathematics and Statistics 5-10-2014 Jackknife Empirical Likelihood Inferences for the Skewness and Kurtosis
More informationData Distributions and Normality
Data Distributions and Normality Definition (Non)Parametric Parametric statistics assume that data come from a normal distribution, and make inferences about parameters of that distribution. These statistical
More informationPackage tailloss. August 29, 2016
Package tailloss August 29, 2016 Title Estimate the Probability in the Upper Tail of the Aggregate Loss Distribution Set of tools to estimate the probability in the upper tail of the aggregate loss distribution
More informationSample Reports for The Expert Allocator by Investment Technologies
Sample Reports for The Expert Allocator by Investment Technologies Telephone 212/724-7535 Fax 212/208-4384 Support Telephone 203/364-9915 Fax 203/547-6164 e-mail support@investmenttechnologies.com Website
More informationSubject CS1 Actuarial Statistics 1 Core Principles. Syllabus. for the 2019 exams. 1 June 2018
` Subject CS1 Actuarial Statistics 1 Core Principles Syllabus for the 2019 exams 1 June 2018 Copyright in this Core Reading is the property of the Institute and Faculty of Actuaries who are the sole distributors.
More informationForecasting Singapore economic growth with mixed-frequency data
Edith Cowan University Research Online ECU Publications 2013 2013 Forecasting Singapore economic growth with mixed-frequency data A. Tsui C.Y. Xu Zhaoyong Zhang Edith Cowan University, zhaoyong.zhang@ecu.edu.au
More informationBackTesting Report Presents The Official Study Guide For The Truth About MACD Video Series
BackTesting Report Presents The Official Study Guide For The Truth About MACD Video Series Course Overview How to Make MACD Work for You How MACD Signals Are Used and Misused How BackTesting Helps You
More informationBackground. opportunities. the transformation. probability. at the lower. data come
The T Chart in Minitab Statisti cal Software Background The T chart is a control chart used to monitor the amount of time between adverse events, where time is measured on a continuous scale. The T chart
More informationyuimagui: A graphical user interface for the yuima package. User Guide yuimagui v1.0
yuimagui: A graphical user interface for the yuima package. User Guide yuimagui v1.0 Emanuele Guidotti, Stefano M. Iacus and Lorenzo Mercuri February 21, 2017 Contents 1 yuimagui: Home 3 2 yuimagui: Data
More informationPackage BatchGetSymbols
Package BatchGetSymbols November 25, 2018 Title Downloads and Organizes Financial Data for Multiple Tickers Version 2.3 Makes it easy to download a large number of trade data from Yahoo Finance. Date 2018-11-25
More informationSAME SAME BUT DIFFERENT
Most of us will be familiar with the experience of driving in a large metropolitan area. If you are familiar with the city, you can typically estimate with some precision how long it will take to drive
More informationA REFINED MACD INDICATOR EVIDENCE AGAINST THE RANDOM WALK HYPOTHESIS?
A REFINED MACD INDICATOR EVIDENCE AGAINST THE RANDOM WALK HYPOTHESIS? Gunter Meissner *, Albin Alex ** and Kai Nolte *** Abstract Rigorous testing of the widely used MACD indicator results in a surprisingly
More informationClass 7: Moving Averages & Indicators. Quick Review
Today s Class Moving Averages Class 7: Moving Averages & Indicators 3 Key Ways to use Moving Averages Intro To Indicators 2 Indicators Strength of Lines Quick Review Great for establishing point of Support
More informationThe Merits and Methods of Multi-Factor Investing
The Merits and Methods of Multi-Factor Investing Andrew Innes S&P Dow Jones Indices The Risk of Choosing Between Single Factors Given the unique cycles across the returns of single-factor strategies, how
More informationPortfolio replication with sparse regression
Portfolio replication with sparse regression Akshay Kothkari, Albert Lai and Jason Morton December 12, 2008 Suppose an investor (such as a hedge fund or fund-of-fund) holds a secret portfolio of assets,
More informationDespite ongoing debate in the
JIALI FANG is a lecturer in the School of Economics and Finance at Massey University in Auckland, New Zealand. j-fang@outlook.com BEN JACOBSEN is a professor at TIAS Business School in the Netherlands.
More informationStock Returns and Holding Periods. Author. Published. Journal Title. Copyright Statement. Downloaded from. Link to published version
Stock Returns and Holding Periods Author Li, Bin, Liu, Benjamin, Bianchi, Robert, Su, Jen-Je Published 212 Journal Title JASSA Copyright Statement 212 JASSA and the Authors. The attached file is reproduced
More informationKARACHI UNIVERSITY BUSINESS SCHOOL UNIVERSITY OF KARACHI BS (BBA) VI
88 P a g e B S ( B B A ) S y l l a b u s KARACHI UNIVERSITY BUSINESS SCHOOL UNIVERSITY OF KARACHI BS (BBA) VI Course Title : STATISTICS Course Number : BA(BS) 532 Credit Hours : 03 Course 1. Statistical
More informationTHE investment in stock market is a common way of
PROJECT REPORT, MACHINE LEARNING (COMP-652 AND ECSE-608) MCGILL UNIVERSITY, FALL 2018 1 Comparison of Different Algorithmic Trading Strategies on Tesla Stock Price Tawfiq Jawhar, McGill University, Montreal,
More informationChapter 4 Level of Volatility in the Indian Stock Market
Chapter 4 Level of Volatility in the Indian Stock Market Measurement of volatility is an important issue in financial econometrics. The main reason for the prominent role that volatility plays in financial
More informationPackage RTDAmeritrade
Package RTDAmeritrade February 15, 2013 Version 0.0.1 Date 2011-06-4 Title RTDAmeritrade Author Theodore Van Rooy Maintainer Theodore Van Rooy Depends R (>= 2.9.1), xts, zoo,
More informationForecasting the Philippine Stock Exchange Index using Time Series Analysis Box-Jenkins
EUROPEAN ACADEMIC RESEARCH Vol. III, Issue 3/ June 2015 ISSN 2286-4822 www.euacademic.org Impact Factor: 3.4546 (UIF) DRJI Value: 5.9 (B+) Forecasting the Philippine Stock Exchange Index using Time HERO
More informationMeasuring abnormal returns on day trading - use of technical analysis. By Rui Ma
Measuring abnormal returns on day trading - use of technical analysis By Rui Ma A research project submitted to Saint Mary's university, Halifax, Nova Scotia in partial fulfillment of the requirements
More informationFinal Exam Suggested Solutions
University of Washington Fall 003 Department of Economics Eric Zivot Economics 483 Final Exam Suggested Solutions This is a closed book and closed note exam. However, you are allowed one page of handwritten
More informationStock Trading Following Stock Price Index Movement Classification Using Machine Learning Techniques
Stock Trading Following Stock Price Index Movement Classification Using Machine Learning Techniques 6.1 Introduction Trading in stock market is one of the most popular channels of financial investments.
More informationPackage finiteruinprob
Type Package Package finiteruinprob December 30, 2016 Title Computation of the Probability of Ruin Within a Finite Time Horizon Version 0.6 Date 2016-12-30 Maintainer Benjamin Baumgartner
More informationBooth School of Business, University of Chicago Business 41202, Spring Quarter 2010, Mr. Ruey S. Tsay. Solutions to Midterm
Booth School of Business, University of Chicago Business 41202, Spring Quarter 2010, Mr. Ruey S. Tsay Solutions to Midterm Problem A: (30 pts) Answer briefly the following questions. Each question has
More informationMonotonicity and Currency Carry Trades: The Implications for Uncovered Interest Rate Parity and Expected Shortfall
ERASMUS UNIVERSITY ROTTERDAM ERASMUS SCHOOL OF ECONOMICS BACHELOR THESIS ECONOMETRICS AND OPERATIONS RESEARCH Monotonicity and Currency Carry Trades: The Implications for Uncovered Interest Rate Parity
More informationStyle Investing with Machine Learning
International Business Research; Vol. 9, No. 12; 2016 ISSN 1913-9004 E-ISSN 1913-9012 Published by Canadian Center of Science and Education Style Investing with Machine Learning Philipp Kallerhoff 1,2
More informationTechnical Trading Rules in Australian Financial Markets
International Journal of Economics and Finance; Vol. 6, No. 10; 2014 ISSN 1916-971X E-ISSN 1916-9728 Published by Canadian Center of Science and Education Technical Trading Rules in Australian Financial
More informationStatistical Models and Methods for Financial Markets
Tze Leung Lai/ Haipeng Xing Statistical Models and Methods for Financial Markets B 374756 4Q Springer Preface \ vii Part I Basic Statistical Methods and Financial Applications 1 Linear Regression Models
More informationFinancial Econometrics Notes. Kevin Sheppard University of Oxford
Financial Econometrics Notes Kevin Sheppard University of Oxford Monday 15 th January, 2018 2 This version: 22:52, Monday 15 th January, 2018 2018 Kevin Sheppard ii Contents 1 Probability, Random Variables
More information