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

learn more… | top users | synonyms

4
votes
4answers
955 views

Library for interactive financial charts

For my recent project I am looking to build a software capable of visualizing financial charts in a dynamically and interactive matter. The workflow is as follows: I gather data from my data ...
4
votes
3answers
215 views

multiperiod optimization using R

I'm interested in multistage optimization problems. Are there any good R packages around to solve such problems over time? I'm not at all an expert in it, so maybe someone knows a good paper / lecture ...
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
2answers
107 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?
1
vote
1answer
144 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 ...
5
votes
0answers
825 views

Tools/R code for predicting Dragon-Kings

The theory of the so called Dragon-Kings, esp. by Didier Sornette (ETH Zürich), basically states that financial crises and crashes are predictable (contrary to the theory of black swans). The ...
5
votes
0answers
581 views

Alternative to Block Bootstrap for Multivariate Time Series

I currently use the following process for bootstrapping a multivariate time series in R: Determine block sizes - run the function b.star in the np package which produces a block size for each series ...
3
votes
0answers
238 views

Kelly Capital Growth Investment Strategy (Example in R)

In the paper Response to Paul A Samuelson letters and papers onthe Kelly Capital Growth Investment Strategy pages 5 and 6 Dr William T Ziemba, gives a praticle example on Kelly Growth. I’m trying to ...
3
votes
0answers
587 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
286 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
0answers
41 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
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
0answers
180 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
411 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
411 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, ...
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
0answers
124 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
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
0answers
97 views

Calculating the efficient frontier from expected returns and SD

I'm trying to calculate the efficient frontier (and the optimal portfolio at the Sharpe ratio) given two vectors for a portfolio: (1) expected returns and (2) historical standard deviations. I would ...
0
votes
0answers
16 views

garchOxFit in R-oxo file does not match

Could someone please help me with trying to get the Ox interface to work in R. I get the following errors as output: This version may be used for academic research and teaching only Link error: ...
0
votes
0answers
62 views

Asian option numerical pricing method generates a negative time value

I use R to write a function which simulates price path and calculates the value of an arithmetic Asian option. I found sometimes the value of the option can be lower than its intrinsic value, i.e., ...
0
votes
0answers
204 views

Calculating the VaR from a GARCH(1,1) with Student-t innovations

I'm self-studying several questions on Ruey S. Tsay's teaching page. I'm experiencing some difficulty getting the correct answer for final exam 2013 Problem B Question 3. Given a Student-t GARCH ...
0
votes
0answers
226 views

Java Implied Volatility Solving

After using RQuantLib and RCaller from Java I am desiring a bit more speed on my implied volatility calculations (for anyone who has used this knows it is quite slow). I need to price a large number ...
0
votes
0answers
229 views

IB with R which package?

I want to implement my models in R and trade according to them with my IB account. Now I am wondering, how I should solve this problem? Do I need to program with C an access ...
-1
votes
0answers
14 views

garchFit formula problems in R

I am working on a Financial Time Series project in R. I am using GMVP.R which has this line: m1=garchFit(~1+garch(1,2),data=rtn[1:t,i],trace=F) I am trying to understand what the 1 before ...