Displaying 20 results from an estimated 200 matches similar to: "Is this a bug in quantmod::OpCl?"
2016 Apr 08
0
Is this a bug in quantmod::OpCl?
On Fri, Apr 8, 2016 at 10:51 AM, James Hirschorn
<james.hirschorn at hotmail.com> wrote:
>
>
> On 04/06/2016 07:58 PM, Joshua Ulrich wrote:
>>
>> On Tue, Apr 5, 2016 at 9:17 PM, James Hirschorn
>> <james.hirschorn at hotmail.com> wrote:
>>>
>>> OpCl works on xts objects but not on quantmod.OHLC objects. Is this a
>>> bug?
2016 Apr 06
2
Is this a bug in quantmod::OpCl?
OpCl works on xts objects but not on quantmod.OHLC objects. Is this a bug?
Example error:
x.Date <- as.Date("2003-02-01") + c(1, 3, 7, 9, 14) - 1
set.seed(1)
x <- zoo(matrix(runif(20, 0, 1), nrow=5, ncol=4), x.Date)
q <- as.quantmod.OHLC(x,c("Open","High","Low","Close"))
# error
OpCl(q)
#> Error in `colnames<-`(`*tmp*`, value =
2018 Mar 15
1
Adjusting OHCL data via quantmod
Hello,
I'm trying to do two things:
-1. Ensure that I understand how quantmod adjust's OHLC data
-2. Determine how I ought to adjust my data.
My overarching-goal is to adjust my OHLC data appropriately to minimize the
difference between my backtest returns, and the returns I would get if I
was trading for real (which I'll be doing shortly).
Background:
-1. I'm using Alpha
2008 Sep 25
3
OHLC Plot with EMA in it
Hi there
I have some timeseries data which I plot in a OHLC Plot. In the same
plot I'd like to have the EMA of this timeseries. I tried to add the
EMA point to OHLC with lines(), but this doesn't work. Has anyone an
idea how to handle it?
Regards, Michael Zak
2012 Jan 24
1
problems with rollapply {zoo}
Here is a relatively simple script (with comments as to the logic
interspersed):
# Some of these libraries are probably not needed here, but leaving them in
place harms nothing:
library(tseries)
library(xts)
library(quantmod)
library(fGarch)
library(fTrading)
library(ggplot2)
# Set the working directory, where the data file is located, and read the
raw data
2013 Sep 27
1
gráficos de cotizaciones
Comparto totalmente la sugerencia de Carlos Ortega. Si aún así quieres
gráficos de velas o gráficos OHLC el mejor paquete que puedes usar es uno
de temas financieros:
http://www.quantmod.com/
Ten en cuenta que en los mercados bursátiles tiene algún sentido usar ese
tipo de gráfico ya que en la apertura y mayormente en el cierre diario se
concentran operaciones.
Me imagino que esto no es así con
2013 Sep 26
1
Grouping Matrix by Columns; OHLC Data
HI,
May be this helps:
set.seed(24)
?mat1<- matrix(sample(1:60,30*24,replace=TRUE),ncol=24)
colnames(mat1)<- rep(c("O","H","L","C"),6)
indx<-seq_along(colnames(mat1))
n<- length(unique(colnames(mat1)))
?res<- lapply(split(indx,(indx-1)%%n+1),function(i) mat1[,i])
lapply(res,head,2)
#$`1`
#????? O? O? O? O? O? O
#[1,] 18 56 51 24 24 52
#[2,]
2012 Oct 19
1
to.yearly()
v="IBM"
library(quantmod)
v
v1=getSymbols(v)
to.yearly(v1)
===============================
when i pass the value through a variable in to.yearly() function it shows
the error msg like
"Error in try.xts(x) :
Error in UseMethod("as.xts") : no applicable method for 'as.xts' applied
to an object of class "character""
i need the result of OHLC
2010 Nov 22
2
How to combine Date and time in one column
Hello everyone,
I am trying to built an xts object and i have run into some problems on the
data handling. I would really appreciate if someone could help me with the
following:
1) I have a OHLC dataset with Time and date in different columns. How could
i combine date and time in one column in order to pass on the new column to
xts? I have use cbind and data.frame before but i did not manage to
2012 Jan 10
1
plotOHLC(alpha3): Error in plotOHLC(alpha3) : x is not a open/high/low/close time series
R version 2.12.0, 64 bit on Windows.
Here is a short script that illustrates the problem:
library(tseries)
library(xts)
setwd('C:\\cygwin\\home\\Ted\\New.Task\\NKs-01-08-12\\NKs\\tests')
x = read.table("quotes_h.2.dat", header = FALSE, sep="\t", skip=0)
str(x)
y <- data.frame(as.POSIXlt(paste(x$V2,substr(x$V4,4,8),sep="
"),format='%Y-%m-%d
2011 Oct 20
4
quantmod package
i am new to the quantmod package . so if the answer is trivial please excuse
me. i want to study stock values within a day. i get current stock updates
using getQuotes and then want to produce usual quantmod graphs with that
values. also the graph should be able of adding technical indicators. please
help. in addition it will be helpful if anyone suggests how to run that code
continuously to get
2010 Aug 14
1
Simple problem with lm/predict
Hi all,
I've got an xts time series with monthly OHLC Dow Jones industrial index
data from 1980 to present, the data is in stored in x.
I've done an OLS fit on the data in 1982::1994 and stored it in extrapolate1
(x[,4] contains the closing value for the index).
> t3 <- seq(1980,1994,length = length(x["1980::1994",4]))
> t4<-t3^2
> extrapolate1 <-
2009 Dec 18
0
data download from metastock into r-software
Hi All,
is there a way to download data from metastock to R-software. most of my data is in date,OHLC format downloaded from reuters to metastock software in my local pc.
many thanks for the help.,
krishna
[[alternative HTML version deleted]]
2012 Jan 11
0
Error in charToDate(x)
Dear all,
I have a problem while working with hourly data of fx rates. I've read from
a csv file, the following way:
csv-file like:
Date,Open,High,Low,Close,Volume
2011-08-11 03:00:00,1.41758,1.42205,1.41625,1.42174,8974
...
2011-08-12 04:00:00,1.42175,1.42413,1.42067,1.42172,7229
...
2011-12-30 05:00:00,1.42173,1.42341,1.42062,1.42171,6703
...
raw<-
2008 Jul 12
1
Assoociative array?
I have search the archive and I could not find what I need so I will try to ask the question here.
I read a table in (read.table)
a <- read.table(.....)
The table has column names like DayOfYear, Quantity, and Category.
The values in the row for Category are strings (characters).
I want to get all of the rows grouped by Category. The number of unique category names could be around 50. Say
2008 Mar 22
2
intraday OHLC plot
I want to create a open/high/low/last plot of intraday data.
I try to use the function plotOHLC from the tsteries package. I create
my own multiple time series and then try to plot it.
raw Data Format (file eurusd2.csv):
"Date (GMT)" "Open" "High" "Low" "Last"
17-03-2008 00:00:00 1,5764 1,5766 1,5747 1,5750
17-03-2008 00:05:00 1,5749 1,5750 1,5741
2010 Oct 24
3
Long model formulae
What is a good way to enter a very long model formula. For example:
y ~ Input.2 + Input.3 + ... + Input.1000
(assuming the corresponding dataframe has many other columns).
Is there a way to convert a character string to a formula? Are there command line expansions in R besides the simple '.'?
Thanks.
[[alternative HTML version deleted]]
2010 Oct 31
3
extracting named vector from dataframe
Suppose df is a dataframe with one named row of numeric observations. I want
to coerce df into a named vector.
as.vector does not work as I expected: as.vector(df) returns the original
dataframe, while as.vector(df,mode="numeric") returns an unnamed vector of
NAs.
This works:
> v <- as.numeric(as.matrix(df)); names(v) <- names(df);
I just wanted check if there
2010 Oct 04
3
read columns of quoted numbers as factors
Suppose I have a data file (possibly with a huge number of columns), where the
columns with factors are coded as "1", "2", "3", etc ... The default behavior of
read.table is to convert these columns to integer vectors.
Is there a way to get read.table to recognize that columns of quoted numbers
represent factors (while unquoted numbers are interpreted as
2011 Jul 19
1
Plotting intraday data in quantmod
Hello, I'm new to R and am having trouble plotting intraday data on a chart.
I haven't had any success with using ideas from some other posts or other
content.
My data is in csv format, here's the first few rows:
TimeStamp..UTC. Open High Low Close
1 2011-06-15 13:30:00:0000 127175 127500 126925 127425
2 2011-06-15 14:00:00:0000 127400 127575 127225 127225
3 2011-06-15