An open source programming language and software environment for statistical computing and graphics.

learn more… | top users | synonyms

3
votes
0answers
593 views

FIGARCH estimation in R

I am trying to estimate a FIGARCH(1,1) model in R for Value-at-Risk purposes. As I understand it, the rugarch package does not support FIGARCH or FIEGARCH. To that end, I used the garchOxFit function ...
3
votes
0answers
287 views

Definition of risk factors for market risk scenario testing

I am doing a research for stress testing in market risk. The usual process I found out for scenario testing is: Define risk factors upon the portfolio Define the desired scenarios Vary the risk ...
3
votes
0answers
150 views

RQuantLib: any difference between FixedRateBond() and FixedRateBondPriceByYield() with flat term structure?

Please, consider the following functions from RQuantLib package: FixedRateBond() ...
3
votes
0answers
320 views

How to balance two Forex crosses correctly to do a linear regression?

I have two cross and an account in EUR: EUR/USD GBP/USD I would like to do a balanced linear regression using R. With "balanced" I mean that I would like to normalize it by calculating the ...
2
votes
2answers
835 views

ROC: difference between discrete and continuous?

Using the ROC function in the R package TTR, there is a choice between continuous (the default) and discrete, but with no guidance on which you choose when. In the code the difference is: ...
2
votes
3answers
727 views

RQuantLib, Hoadley and Bloomberg YAS: fixed rate bond pricing differences?

I'm trying to price a fixed rate bond one year from now on. The bond is the PEUGOT 7 ⅜ 03/06/18, whose ISIN code is FR0011439975. I'm using such a specific example because in this way everyone can ...
2
votes
2answers
959 views

backtesting options strategies in R

I would like to backtest an options strategy in R. I require the ability to delta hedge and rebalance to options in the portfolio at different frequencies (daily, monthly,etc.) What packages are the ...
2
votes
1answer
1k views

ADF test in R yielding perfect cointegration. How is this possible?

I am using the famous conintegrated pairs tutorial to just different stocks for cointegration. The adf.test yeilds perfect cointegration, which I feel must be incorrect. Here is why: When I run ...
2
votes
1answer
46 views

Does Nelson-Siegle require adjustments to yield curve input data?

I am attempting to gain a better understanding of the limitations of the Nelson-Siegel model as described in Estimating the Yield Curve Using the Nelson-Siegel Model. As I have been playing around ...
2
votes
1answer
167 views

Stress Testing Methods

I'm working on the following task: Given quarterly data: a time series representing the 1-year realized (10 years of data) rates of default on a portfolio of mortgages a slew of ...
2
votes
1answer
104 views

Aftcast Generation

Aftcast is a way of simulating equity curves for different start years, usually from a large sample data ~100 years. Its kind of like start date sensitivity testing but in my case, I incorporated ...
2
votes
1answer
79 views

ARIMA model, cannot get rid of low order ACF spike

I've gone through all the steps to fit a good ARIMA model - I plotted the data, I looked at the ADF tests, I looked at the ACF plot with no AR and MA terms just a constants. I came up with an ...
2
votes
1answer
662 views

Counterintuitive time varying Beta with Kalman filter

If you're used to play with R, you'll enjoy the following reproducible code: ...
2
votes
2answers
2k views

Cointegration tests

I'm trying to figure out how to perform cointegration tests in R between 2 time series. I'm using po.test from the package ...
2
votes
1answer
311 views

Stepwise Cointegration

This is more of a general question at this point, but if my thought process makes sense I will follow up with an R implementation. I have read a number of papers on cointegration analysis for pairs ...
2
votes
1answer
543 views

R ARMA-GARCH rugarch package doesn't always converge

I'm trying to compute the standard ARMA(1,1)-GARCH(1,1) as shown in this answer for an entire index,just to store in a database to quickly lookup values for back ...
2
votes
2answers
83 views

How to find the best fitting GARCH model for a portfolio composed of 3 ETFs in R?

I am doing a project for my class Financial Time Series in which I am trying to forecast my portfolio log returns using a GARCH fit. I am having a bit of trouble determining the best way to fit this ...
2
votes
0answers
42 views

how to apply a simple copula model

I'm playing around with copulas and wanted to generate some sample based on copula techniques in R. For this purpose I applied the following algorithm: Generate three sample vectors coming from ...
2
votes
0answers
80 views

negative transition probabilities in the heston model

I've been trying to implement a bivariate tree for pricing american options with the heston model in R using the paper of Beliaeva and Nawalkha ...
2
votes
2answers
110 views

Is there a way to adjust R PerformanceAnalytics function VaR with EWMA or GARCH method?

Is there a way to upgrade R PerformanceAnalytics function VaR with more risk sensitive approaches like EWMA or GARCH? Or is there another R package which can handle the issue?
2
votes
0answers
114 views

What R-packages for SOCP problems are there?

Currently, I am looking deeper into the topic of second-order cone programming. Could you suggest packages that solve SOCP-problems in R? With your answer, please provide a short description of ...
2
votes
1answer
299 views

Interpretation of cross-correlation matrix when one sample distribution is not normal

I am looking at the variance of (log) price changes in securities vs. the amount of social media discussion about them. I'm not interested in building a model. I'm just looking to see if there is a ...
2
votes
0answers
181 views

Any one know how to implement the Heston and Rouwenhorst country-sector effects regression in R?

Heston and Rouwenhorst (1994) devised an empirical estimation strategy to decompose stock returns into three components: a pure industry effect, a pure country effect, and a world-factor return. ...
2
votes
0answers
120 views

How to simulate a Geometric Binomial Process with state/tie dependent increments?

I want to simulate a geometric binomial process with state/time dependent increments. So the model is given by \begin{align}R_t=\frac{X_t}{X_{t-1}}\end{align} \begin{align}P(R_t=u)=p(X_{t-1},t) ...
2
votes
0answers
412 views

Philips-Ouliaris test for cointegration

I'm trying to implement cointegration tests using the R urca package. I've figured out the Johansen test (ca.jo), but I'm having trouble with the Philips-Ouliaris test (ca.po). I have two questions: ...
2
votes
0answers
242 views

Error term/Innovation process in ARCH/GARCH processes?

I am wondering about the distribution of the error term/innovation process in a ARCH/GARCH process and its implementation, I am not sure about some points. The basic assumption is ...
2
votes
0answers
124 views

What does negative gamma mean in APGARCH model?

I got a gamma of -0.1321677. ...
2
votes
0answers
414 views

Markov-Switching E-GARCH with R

I am looking for a R library for modeling a Markov-Switching E-GARCH process. In other questions at StackExchange related to GARCH models, the package rugarch is often mentionned. Do you recommend it ...
2
votes
0answers
1k views

Backtest pair trade strategy in R

I am looking for some tips on how to run a simple backtest on a pairtrading strategy intraday using eg. 30minute bars. I have calculated the spread, ...
2
votes
0answers
93 views

Option symbol conversion [closed]

Maybe more of a programming question, Is there a Ruby gem to facilitate conversion of an option symbol notation from one form to another? For example, one source provides TZA1220J18 but an API for ...
1
vote
3answers
72 views

Is there any way to easily estimate and forecast seasonal ARIMA-GARCH model in any software?

I use R to estimate a seasonal ARIMA(8,0,0)(5,0,1)[7] model for the seasonal differences of logs of daily electricity prices: ...
1
vote
1answer
4k views

How to get a list of stocks symbol of a specific exchange? [duplicate]

Possible Duplicate: Where to download list of all common stocks traded on NYSE, NASDAQ and AMEX? Is it possible to download a list of stocks that belong to a specific exchange (e.g. NASDAQ, ...
1
vote
1answer
31 views

Geometric Return & Performance Results for Quarterly Rebalancing

I have a Portfolio that is rebalanced every 3-months. The portfolio is made up of assets that have daily log-returns. I am a bit confused when charting the results using ...
1
vote
1answer
893 views

GARCH model and prediction

I have a question about the prediction of volatility and returns of a time series. Basically it is a question about prediction in the ...
1
vote
0answers
23 views

Ibrokers: reqMktData extremely slow when adding tickers

I am trying to snap prices in R for the latest price for a list of stocks (around 150). When I snap them for 2 stocks, it's almost instantaneous: ...
1
vote
0answers
52 views

Stationarity tests in the frequency domain for regression

Strict stationarity is the strongest form of stationarity. It means that the joint statistical distribution of any collection of the time series variates never depends on time. So, the mean, variance ...
1
vote
0answers
117 views

one-step-ahead Stochastic Volatility for 5-minute VWAP prices

I'm trying to run an SV model against prices of Euro/USD. For those not familiar with SV, its a volatility model in which each point gets its own volatility parameter $h_t$ with 3 main parameters that ...
1
vote
1answer
108 views

Plot Evolution of portfolio weights over time in R [closed]

Is there any function for plotting the evolution of portfolio weights over time in r?. I have a matrix of portfolio weights from an equal weighting strategy at rebalancing times and want to plot ...
1
vote
0answers
127 views

The option values are different from two r package - foptions,rquantlib

The results are very different.I know the code from quantlib and the result of quantlib seem right(close to market price). Is there anyone know why the value from fOptions is so large or fOptions used ...
1
vote
0answers
128 views

trading strategy outperforms passive strategy in absolute terms, but in returns vice versa. how could this be?

Background: I want to compare two trading strategies in term of profitability. The red one is an active trading strategy, which involves many entry and exit to a specific market. The blue one is a ...
1
vote
0answers
50 views

rugarch and rolling estimation

I use Rugarch for a long time in order to calibrate GARCH models on FX rates time series and perform simulations. I am trying to understand the ugarchroll method. However even if I can find plenty of ...
1
vote
0answers
102 views

RCaller & RQuantlib error in java

I am receiving the following error: ...
1
vote
0answers
33 views

How to set up Heston and Rouwenhorst regression? [duplicate]

Heston and Rouwenhorst (1994) devised an empirical estimation strategy to decompose stock returns into three components: a pure industry effect, a pure country effect, and a world-factor return. ...
1
vote
0answers
292 views

Interpolate option volatility in delta space in R

I have a bunch of deltas and option implied vols at those deltas. I would like to interpolate them in R. Interpolating them in delta space seems difficult, since normally you would like the ATM calls ...
1
vote
0answers
521 views

portfolio optimization with a loop

I am attempting to minimize the variance of a 3 stock portfolio using optimization within a loop. What I have done is calculated the stock returns and cov matrix from dates 1980-01-01 to 1989-12-31 ...
0
votes
3answers
7k views

Kalman Filter Equity Example

I am looking out for some material where I can study about Kalman Filter applied to Equity using Excel or R?
0
votes
2answers
365 views

garchOxFit in R

Could someone please help me with trying to get the Ox interface to work in R. I followed the steps outlined in this paper (http://papers.ssrn.com/sol3/papers.cfm?abstract_id=1752095), but I get the ...
0
votes
1answer
198 views

I want to keep a column in getSymbols or get.hist.quote with the Date as as.Date format [closed]

I use getSymbols to download historical information over an environment with 200 tickers but I cannot seem to keep the date information from becoming an index. I ...
0
votes
1answer
251 views

How to plot custom hourly data into R with quantmod?

I'm trying to get into R because for some personal project, I need R and quantmod to create OHCL charts for me. I'm stuck at the candleChart creation step, and I'm not sure I understand why. Using a ...
0
votes
2answers
142 views

Daily option data

I am wondering where I can pull daily (hourly, by-the-minute, etc. even better) option data for a particular underlying. I would prefer a database I could scrape through and API, but would not mind ...