[R-SIG-Finance] Bollinger Band
Frank
|r@nkm60606 @end|ng |rom gm@||@com
Tue Aug 4 02:24:48 CEST 2020
Thanks for the code. I’m not able to do what you want with chartSeries(). I use plot() but not with Bollinger Bands.
You can add
Pdf(IBEX35)
Before your chartSeries call to change the file name you create from the default.
Frank
Chicago
From: Pedro páramo
Sent: Monday, August 03, 2020 4:44 PM
To: Frank <frankm60606 using gmail.com>
Cc: r-sig-finance using r-project.org
Subject: Re: [R-SIG-Finance] Bollinger Band
Sorry I fotgot to paste the code, sorry again:
library(PerformanceAnalytics)
library(dplyr)
library(tibble)
library(lubridate)
library(PerformanceAnalytics)
library(quantmod)
library(ggplot2)
library(png)
library(TTR)
Ibex35<-na.omit(getSymbols("^IBEX",from="2007-12-31"))
chartSeries(IBEX, TA="addBBands(n=200, sd=1.9)", theme="white")
El lun., 3 ago. 2020 a las 22:50, Frank (<frankm60606 using gmail.com <mailto:frankm60606 using gmail.com> >) escribió:
If you could post your data and plot code, I could make more suggestions.
My main title is created by
main="SPY V(1) Parameters (V, V^2 & V^0.5) Unweighted",
in the below code. Yours might be
main=”IBEX”
pdf("V12_w_Scatter_Plot.pdf")
labels <- c(r2lm2l_label,r2lm2b_label)
labels
plot(VV12, Lambda12, ylim=yrange, tck=1, main="SPY V(1) Parameters (V, V^2 & V^0.5) Unweighted", xlab="VV12", ylab="Lambda12 & Beta12",pch=19,col="red")
{points(VV12, lm2.lforecast, pch=19, col="brown")
abline(lm2.lforecastline, col="brown", lty="longdash", lwd=2)
points(VV12, Beta12, pch=19, col="blue")
points(VV12, lm2.bforecast, pch=19, col="purple")
abline(lm2.bforecastline, col="purple", lty="longdash", lwd=2)
legend("topright", inset=.05, title="Parameters", labels, col=colors, lwd=2)
}
Frank
Chicago
From: R-SIG-Finance On Behalf Of Pedro páramo
Sent: Monday, August 03, 2020 3:15 PM
To: r-sig-finance using r-project.org <mailto:r-sig-finance using r-project.org>
Subject: [R-SIG-Finance] Bollinger Band
Hi all,
I have this code that plots BB, I want both this:
Add a main title specified by me up on the default title that adds IBEX and the date.
On the other hand, I would like to omit the legend but extract Upper and Lower bands in two different values to use latter and add like the title a "row" below the plot to add a comment o "sub main title" just below the plot and say "attention to the lower band" XXX (extracted value)
Last question, just below the graph there are some small boxes on a more or less row, on grey color, up on the dates but below the graph ¿What are this grey boxes? ¿Can I omit?
Many thanks in advance.
I attach and example of what I reffer
[[alternative HTML version deleted]]
More information about the R-SIG-Finance
mailing list