# Hi all,
# trying to run the following example code
# from 'RQuantLib' package...
HullWhite - list(term = 0.055, alpha = 0.03, sigma = 0.01,
gridIntervals = 40)
Price - rep(as.double(100),24)
Type - rep(as.character(C), 24)
Date - seq(as.Date(2006-09-15), by = '3 months',
Cren wrote
# trying to run the following example code
# from 'RQuantLib' package...
# Obviously, run
require(RQuantLib)
# before executing the example :)
--
View this message in context:
http://r.789695.n4.nabble.com/RQuantLib-SET-VECTOR-ELT-can-only-be-applied-to-a-list-not-a-symbol
Enrico Schumann-2 wrote
I cannot reproduce this error. I get...
sessionInfo()
*R version 2.15.1* (2012-06-22)
# Thank you for testing, Enrico (Italian? ),
# it seems an updating issue.
# I am trying to update everything possible to the latest
# version because of compatibility.
--
transition
# matrix. Then I am afraid of every solver finding
# local maxima (or minima) because of some
# jump in Credit VaR surface function of
# portfolio weights :(
On Jul 18, 2012, at 3:09 PM, Cren wrote:
# Whoops! I have just seen there's a little mistake
# in the 'sharpe' function
Hans W Borchers wrote
The most robust solver for non-smooth functions I know of in R is
Nelder-Mead
in the 'dfoptim' package (that also allows for box constraints).
First throw out the equality constraint by using c(w1, w1, 1-w1-w2) as
input.
This will enlarge the domain a bit, but
Roger Koenker-3 wrote
There are obviously a large variety of non-smooth problems;
for CVAR problems, if by this you mean conditional value at
risk portfolio problems, you can use modern interior point
linear programming methods. Further details are here:
# Hi all,
# consider the following code (please, run it:
# it's fully working and requires just few minutes
# to finish):
require(CreditMetrics)
require(clusterGeneration)
install.packages(Rdonlp2, repos= c(http://R-Forge.R-project.org;,
getOption(repos)))
install.packages(Rsolnp2, repos=
# Whoops! I have just seen there's a little mistake
# in the 'sharpe' function, because I had to use
# 'w' array instead of 'ead' in the cm.CVaR function!
# This does not change the main features of my,
# but you should be aware of it
---
# The function to be minimized
sharpe - function(w) {
# Thank you, Michael: it works fine!
--
View this message in context:
http://r.789695.n4.nabble.com/Getting-objects-from-quantmod-ticker-list-tp4635708p4636440.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org
# I've read that rollapply, and its wrapper apply.rolling()
# from PerformanceAnalytics package, do not work with multivariate
# time series neither their output can be a multivariate time series.
# Then I was wondering if any other function like those exists, or
# if I need to write my own
# One more question, Joshua: let instead of merging tickers
# I would like to put prices from an OHLC object
# in weekly format, then selecting just the close prices.
# What would be a code to do it?
# I guess:
data = new.env()
ticker.list - c('SPY', 'TLT', 'GLD')
getSymbols(ticker.list, env =
Hi all,
I would need to put datas downloaded with quantmod into a matrix or a data
frame.
Suppose to start from here:
*require(quantmod)
ticker.list - c('AAA', 'ALTSALES','AMBNS','AMBSL','BAA',
'EMRATIO',
'FEDFUNDS', 'GASPRICE', 'GS1', 'GS10', 'GS20',
Joshua Ulrich wrote
Load the data into an environment, then merge them using do.call():
series.env - new.env()
getSymbols(ticker.list, src='FRED', env=series.env)
series - do.call(merge, as.list(series.env))
Thank you very much, Joshua: this works very well!
Thank you :)
--
View
Hi all,
I was wondering why I get errors trying to solve this:
*simeq - function(x) {
f - numeric(length(x))
f[1] - x[1] * dnorm((log(x[1]/D) + (r + x[2]^2/2) * T)/(x[2] * sqrt(T)))
- D * exp(-r * T) * dnorm((log(x[1]/D) + (r + x[2]^2/2) * T)/(x[2] *
sqrt(T)) - x[2] * sqrt(T))
f[2] -
Hi all,
let I have two text string:
*one - c(ciao,zio,caio,bello)
two - c(caio,zio)*
I would like to obtain a new text string which is* one - two* like this one:
[1] ciao bello
because caio and zio elements have been subtracted from *one*.
What's the most efficient way to obtain this?
Thank
Rui Barradas wrote
Hello,
?setdiff
setdiff(one, two)
Thank you for your help, Rui.
But
* setdiff(one,two)
[1] ciao*
Where's bello?
--
View this message in context:
http://r.789695.n4.nabble.com/Subtracting-test-string-from-vectors-tp4632049p4632053.html
Sent from the R help mailing
Thank you, Michael :)
Michael Weylandt wrote
If that doesn't nail it down, I'll need you to answer the questions I
asked in my previous email.
Previously I made a mistake with *dput()*, this is the correct output:
dput(X)
new(timeSeries
, .Data = structure(c(124.3, 124.38, 124.67,
Hi,
unless you're dealing with heteroskedastic datas, the command *cor(x)* will
be enough, where *x* is your data matrix; in this function you can easily
select the method which has to be used: Pearson's, Kendall's or Spearman's
correlation.
--
View this message in context:
Michael Weylandt wrote
Can you provide a reproducible example?
Of course, Michael.
Consider the following time series:
11/2/2011 14:30 123.53
11/2/2011 15:00 123.78
11/2/2011 15:30 124.24
11/2/2011 16:00 124.2
11/2/2011 16:30 124.07
11/2/2011 17:00 123.91
11/2/2011 17:30 123.44
11/2/2011
Hello,
I have a time series with intraday datas, sampled every 30'; I would need to
aggregate them in this way: summing up all datas within a day.
I tried to use *aggregate(...)* function to get my goal, but it aggregates
in wrong way (I did not understand how so far); what I need is like
...
z - zoo(1:50, seq.POSIXt(from = Sys.time(), by = 30 min, length.out =
50))
aggregate(z, as.Date(time(z)), sum)
Best,
Michael
On Tue, May 15, 2012 at 11:52 AM, Cren lt;oscar.soppelsa@gt; wrote:
Hello,
I have a time series with intraday datas, sampled every 30'; I would need
Hi all,
I've just downloaded and installed the latest R 32-bit version plus RExcel
and R Commander.
I'm having several problems in loading gogarch package:
The command *library(gogarch, pos=4)* returns *ERROR: package/namespace load
failed for 'gogarch'*
The command *require(gogarch)* returns
If I use gogarch_0.7-1 the command *require(gogarch)* returns the following
error: *Error in get(.packageName, where) : cannot allocate memoby block
of size 3.2 Gb*
--
View this message in context:
http://r.789695.n4.nabble.com/R-i386-2-15-0-gogarch-package-issue-tp4629888p4629889.html
Sent from
Ok, solved.
If anyone had the same problem, just install the last gogarch pacakge (vers.
0.7-1) and restart R + R Commander after the package installation.
When you've restarted it, the command *require(gogarch)* should load fastICA
package in the end and it will work ;)
--
View this message in
Pascal Oettli-2 wrote
Hello,
Probably you should try:
update.packages(checkBuilt=TRUE)
install.packages('gogarch', dependencies=TRUE)
Best Regards,
Pascal
Dear Pascal Oettli-2,
thank you for your suggestment; I was not aware of that command and it will
be very useful when new
Hi all :)
Before posting, I used the search function to find a solution, but I
wasn't lucky.
I'm using RExcel; I've read several examples which explain how to call in
RExcel an R function via =RApply(...) but I don't understand how may I
include in the function several numeric arguments.
Take
26 matches
Mail list logo