the
> wanted tibble.
>
> Thank you for help
>
Do you mean something like this?
data.frame(my.ret.lst)
## BTCUSDT ETHUSDT TRXUSDT
## Annualized Return 15.364.0610.9
(I don't use tibbles, but there is probably an 'as.tibble' method or
similar.
-0.49%") NA
> #3 c("SWT 0.50% fwd", " 0.05%") NA
> #4 c("CAP ATM Fwd", " -0.46%") NA
> #5 c("SWT 0.50% fwd", " 0.08%") NA
> #6 c("CAP ATM Fwd", " -0.40%") NA
> #7 c("SWT 0.50% fwd&
M Fwd: -0.46%\", \""
>
> #[3] " 0.08%\", \"CAP ATM Fwd: -0.40%\", \""
>
> #[4] " 0.11%\", \"CAP ATM Fwd: -0.32%\", \""
>
> #[5] " 0.14%\", \"CAP ATM Fwd: -0.23%\", \""
>
n.)
As I said, please provide a reproducible example: use
?dput to provide example data, and also describe what
you want to achieve. Perhaps this helps:
txt <- c("CAP ATM Fwd: -0.49%", "CAP ATM Fwd: -0.49%")
spl <- strsplit(txt, ":", fixed = TRUE)
#
"CAP ATM Fwd: 0.07%" "SWT 0.50% fwd: 0.25%"
>
> Many thanks
> Emmanuel
>
Please provide a reproducible example, so that people can help you.
(It's not what you have written, but did you mean "the
numbers after the colons"? Then
2:38, Alec Schmidt wrote:
>>
>> I used to have R version 3.6.0 and tried to install PairTrading but got a
>> message that the package is not available for that version.
>> Now I've updated R to 4.0.2. but still have the message:
>>
>> package �PairTrading�
t; ___
>> > >
>> > > R-SIG-Finance@r-project.org
>> > >
>> > >
>> > > mailing list
>> > >
>> > > https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>> >
split_adjust(x = c(100, 25, 25), ## prices
t = c(2, 2), ## index when split occurs
ratio = c(2, 2)) ## split ratio
## [1] 25 25 25
split_adjust(x = c(100, 25, 49), t = c(2, 2),
ratio = c(2,2), backward = FALSE)
## [1] 100 100 100
-
t;portfolio = pspec,
>optimize_method = "DEoptim", )
> data.frame(optimize.portfolio = opt$weights, portfolio.optim =
> round(popt$pw, 3))
>
If all else fails, and supposing that 'PortfolioAnalytics' per
default computes means and covaria
ion, add.distribution.constraint, ...
Sam> Original message was not delivered due to attachments, I guess.
Sam> --
Sam> Best regards,
Sam> Sam
Perhaps the examples in https://ssrn.com/abstract=3374195 are of
interest (though they do not use PortfolioAnalytics).
kind regards
ch for the Low column which might cause a dimnames
error
>> down the line.
>>
Joshua> --
Joshua> Joshua Ulrich | about.me/joshuaulrich
Joshua> FOSS Trading | www.fosstrading.com
Joshua> R/Finance 2019 | www.rinfinance.com
--
Enrico Schumann
Lucerne, S
oducible example. Also, please do not post in HTML,
as code examples get scrambled and become unreadable.
(If I had to venture a guess, I'd think you've
forgotten one of those `%>%` before 'solve_model'.)
--
Enrico Schumann
Lucerne, Switzerland
http://enricoschumann.net
__
things right. I heard once that
>> others could not replicate my results; that is, they have reliable
>> estimates for GARCH parameters. But I never found out who those people
>> were and they did not give me their code to see what
'c()' or 'drop()' to drop the dimension and create a
vector.
kind regards
Enrico
m> On 26/01/2019, Enrico Schumann wrote:
>>>>>>> "m" == mmm ammm writes:
>>
m> Dear all,
m> i'm hoping that one of you can help me in the following
g to the columns of the population
matrix. However, since the user specifies the
objective function, 'DEopt'/'PSopt' cannot know
automatically in what way the objective function is
written; so you need to tell the functions by setting
'loopOF' to TRUE (the default) or to FALSE.
kind regards
also
https://stats.stackexchange.com/questions/354157/determining-up-down-market-trends-in-timeseries-data/373622#373622
https://cran.r-project.org/web/packages/PMwR/vignettes/Drawdowns_streaks.pdf
--
Enrico Schumann (maintainer of PMwR)
Lucerne, Switzerland
http://enricoschumann.net
ibrary("IBrokers")
| tws <- twsConnect()
| contract1 <- twsContract(
| local = "ZS NOV 18",
| sectype = "FUT",
| exch = "ECBOT",
| currency = "USD",
| include_expired = "1",
| conId = "",
order.by=as.Date(paste(returns$Dato,
> "%m/%d/%Y")))
> and run the optimization but summary(opt) again returned
>
> xts(x, order.by = order.by, frequency = frequency, ...) :’order.by' cannot
> contain 'NA', 'NaN', or 'Inf'
>
>
> [[alternative HTML versi
, for daily data I found an
ad-hoc storing/updating in CSV-files sufficient
(https://github.com/enricoschumann/tsdb)
HTH
--
Enrico Schumann
Lucerne, Switzerland
http://enricoschumann.net
___
R-SIG-Finance@r-project.org mailing list
https://stat
-98397-11444http://in.linkedin.com/in/pankajkagarwal/
As a starting point, you could look at the packages listed here:
https://cran.r-project.org/web/views/Finance.html
--
Enrico Schumann
Lucerne, Switzerland
http://enricoschumann.net
___
R-SIG-Fin
ect()
reqContractDetails(tws, c)
## List of 18
## $ version : chr "8"
## $ contract :List of 16
## ..$ conId : chr "271618757"
## ..$ symbol : chr "HDFC"
## ..$ sectype: chr "OPT"
## ..$ exch
ndex","MXWO Index","MXEA Index"),
fields = "PX_LAST",
start.date = as.Date("2017-01-01"),
end.date = as.Date("2017-01-05"))
do.call("merge",
lapply(res, function(x) zoo(x[[2]], x[[1]])))
--
Enri
;Calendar Year Returns.csv")
>
Do you mean the output of print(returns) or of
print(cal.list)?
In either case, if you want to store the results as
they show up in the console, you could use
?capture.output, as in
capture.output(cal.list, file = "returns.txt")
--
Enrico Schum
tabase of
contracts with the four mentioned attributes, and
then refer to this list when contract information is
needed.
--
Enrico Schumann
Lucerne, Switzerland
http://enricoschumann.net
___
R-SIG-Finance@r-project.org mailing list
https://stat.et
-01"),
as.Date("2016-12-31"),
by = "1 day")
timestamp <- aggregate(timestamp,
by = list(format(timestamp, "%Y-%m")),
FUN = tail, 1)[[2]]
e thing to check is your
implementation of the objective function for 'nloptr'.
Kind regards (and good luck)
Enrico
> ________
> From: Enrico Schumann <e...@enricoschumann.net>
> Sent: Friday, March 18, 2016 11:08 AM
> To: Alec Schmidt
>
Alec
[...]
Unless your covariance matrix is 'broken' in some way, a
minimum-variance portfolio with only a budget constraint should be
fairly easy to compute (no multiple local minima, smooth objective
function, ...). Please provide a reproducible example.
Kind regards,
Enrico
--
Alec. But you will need to
simplify it if people are to help you. [My bad: I should have
said _minimal_ reproducible example:
https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
]
> ________
> From: Enrico Schumann <e...@e
have an example of a solver. A lengthier discussion is in
Section "13.2.5 Repairing Matrices" in this book
@BOOK{Gilli2011b,
title= {Numerical Methods and Optimization in Finance},
publisher= {Elsevier/Academic Press},
year = 2011,
author = {Gilli, Manfred an
.
Second, on raising negative numbers to the zeroth power: you need to
consider operator precendence. The ^ binds more tightly than -,
hence
-1^0
is -1. But
(-1)^0
will give 1.
--
Enrico Schumann
Lucerne, Switzerland
http://enricoschumann.net
.
--
Enrico Schumann
Lucerne, Switzerland
http://enricoschumann.net
___
R-SIG-Finance@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note
On Sun, 24 Aug 2014, alexios ghalanos alex...@4dscape.com writes:
On 24/08/2014 19:24, Enrico Schumann wrote:
On Fri, 22 Aug 2014, alexios ghalanos alex...@4dscape.com writes:
1. DEoptim is a nonlinear global optimization solver. Global
optimization is usually reserved for hard to solve non
[1] Disclosure: I am the package author.
[2] http://enricoschumann.net/NMOF.htm#Book
[3] http://enricoschumann.net/NMOF.htm#NMOFmanual
[4] http://cran.r-project.org/web/views/Optimization.html
--
Enrico Schumann
Lucerne, Switzerland
http://enricoschumann.net
fBasics_3010.86timeSeries_3010.97 timeDate_3010.98
[9] robustbase_0.9-10 MASS_7.3-29
loaded via a namespace (and not attached):
[1] quadprog_1.5-5 Rglpk_0.4-1 slam_0.1-28 stabledist_0.6-6
--
Enrico Schumann
Lucerne, Switzerland
http://enricoschumann.net
, by = 0.5)
s - ind(x, Pred2[ ,1], Pred2[ ,2])
plot(x, s, type = S)
range(ca - x[s == max(s)])## consensus area
all.equal(max(diff(ca)), diff(x)[1L]) ## single area?
Regards,
Enrico
--
Enrico Schumann
Lucerne, Switzerland
http://enricoschumann.net
the 'timeLastNdayInMonth' function is from a package? Then you
should also contact directly the package's maintainer.
--
Enrico Schumann
Lucerne, Switzerland
http://enricoschumann.net
___
R-SIG-Finance@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r
Grigonis
[[alternative HTML version deleted]]
Please send plain-text messages to this mailing list.
--
Enrico Schumann
Lucerne, Switzerland
http://enricoschumann.net
___
R-SIG-Finance@r-project.org mailing list
https://stat.ethz.ch/mailman
your code, but shouldn't you discount the result?
--
Enrico Schumann
Lucerne, Switzerland
http://enricoschumann.net
___
R-SIG-Finance@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want
Technology, Stockholm, Sweden
matti.zem...@gmail.com
--
Enrico Schumann
Lucerne, Switzerland
http://enricoschumann.net
___
R-SIG-Finance@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want
yourself. There
has been some discussion of such methods on this list in the past;
Patrick Burns has also had some blog posts about R implementations
(there you could get some pointers to R packages).
Best regards,
Enrico
--
Enrico Schumann
Lucerne, Switzerland
http://enricoschumann.net
appreciated. I know this isn't strictly finance,
but I can imagine the finance community probably has the most amount of
use for something like this on a daily basis (emailing automated
analysis to yourself / desk etc)
n.
--
Enrico Schumann
Lucerne, Switzerland
http://nmof.net
for regular optimizers;
but using Genetic Algorithms to evolve trading strategies seem to be
different. Anywhere we could find such an example in R?
What you probably mean is Genetic Programming, not Genetic Algorithms.
Regards,
Enrico
--
Enrico Schumann
Lucerne, Switzerland
http://nmof.net
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should
go.
--
Enrico Schumann
Lucerne, Switzerland
http://nmof.net
Am 10.02.2012 15:24, schrieb J Toll:
On Fri, Feb 10, 2012 at 3:18 AM, Enrico Schumann
enricoschum...@yahoo.de wrote:
Hi all,
(comments below)
Am 10.02.2012 01:02, schrieb J Toll:
On Thu, Feb 9, 2012 at 5:17 PM, Dirk Eddelbuettele...@debian.orgwrote:
On 9 February 2012 at 17:06, J
investments referred to herein. In the case of certain securities Commonwealth
Bank is or may be the only market maker.
-Original Message-
From: Enrico Schumann [mailto:enricoschum...@yahoo.de]
Sent: Thursday, 2 February 2012 8:45 PM
To: Roupell, Darko
Cc: r-sig-finance@r-project.org
note that this is not the r-help list where general R questions should
go.
--
Enrico Schumann
Lucerne, Switzerland
http://nmof.net/
___
R-SIG-Finance@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting
that this is not the r-help list where general R questions should
go.
--
Enrico Schumann
Lucerne, Switzerland
http://nmof.net/
___
R-SIG-Finance@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only
/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should
go.
--
Enrico Schumann
Lucerne, Switzerland
http://nmof.net/
___
R-SIG-Finance@r
-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should
go.
--
Enrico Schumann
Lucerne, Switzerland
http://nmof.net
.
-- Also note that this is not the r-help list where general R questions should
go.
--
Enrico Schumann
Lucerne, Switzerland
http://nmof.net/
___
R-SIG-Finance@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should
go.
--
Enrico Schumann
Lucerne, Switzerland
http://nmof.net
hm, the last words were actually check on finance.yahoo.com ;) but
they have been cut away.
Am 22.09.2011 11:50, schrieb Enrico Schumann:
It seems a convention that if the rate is USDCCY, you get it from Yahoo
with CCY=X. At least I have had this with JPY=X, GBP=X. But I am not
sure how
[comments inline]
-Ursprüngliche Nachricht-
Von: Brian G. Peterson [mailto:br...@braverock.com]
Gesendet: Dienstag, 2. August 2011 14:37
An: Enrico Schumann
Cc: 'John P. Burkett'; R-SIG-Finance@r-project.org
Betreff: Re: [R-SIG-Finance] Sharpe's algorithm for portfolio
try adding include_expired = '1' to the contract definition; see
?twsContract
regards, enrico
-Ursprüngliche Nachricht-
Von: r-sig-finance-boun...@r-project.org
[mailto:r-sig-finance-boun...@r-project.org] Im Auftrag von
Gautam Garg
Gesendet: Montag, 13. Juni 2011 11:53
An:
54 matches
Mail list logo