[R-SIG-Finance] Use of chart_Series
Hi, There is very little information about chart_Series. I tried the following: S = getSymbols(YHOO) chart_Series(S) addCCI(n=14) # I got the error: Error in get.current.chob() : improperly set or missing graphics device The code above works if I remove addCCI. Any suggestions? Thanks, Gordon [[alternative HTML version deleted]] ___ 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.
Re: [R-SIG-Finance] Use of chart_Series
You cannot mix chartSeries / addTA functions with chart_Series and add_TA functions. -- Joshua Ulrich | FOSS Trading: www.fosstrading.com R/Finance 2012: Applied Finance with R www.RinFinance.com On Sun, Apr 22, 2012 at 9:08 AM, Gordon Erlebacher gordon.erleb...@gmail.com wrote: Hi, There is very little information about chart_Series. I tried the following: S = getSymbols(YHOO) chart_Series(S) addCCI(n=14) # I got the error: Error in get.current.chob() : improperly set or missing graphics device The code above works if I remove addCCI. Any suggestions? Thanks, Gordon [[alternative HTML version deleted]] ___ 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. ___ 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.
[R-SIG-Finance] creation of add_stoch
Hi, Here is my first attempt, modeled after add_SMA: I get the error message Error in xy.coords(x, y) : 'x' and 'y' lengths differ Any ideas? Also, what is on= argument do? I notice that the underlying function stoch() is called multiple times. Unless there is a caching mechanism, it appears that there is unnecessary computation. Am I mistaken? Thanks. Gordon #- add_stoch = function (nFastK = 10, nFastD=3, nSlowD=3, maType, bounded=T, smooth=1, on = 1, ...) { lenv - new.env() lenv$add_stoch - function(x, n, ...) { xdata - x$Env$xdata xsubset - x$Env$xsubset sto - stoch(Cl(xdata), nFastK=nFastK,nFastD=nFastD,nSlowD=nSlowD,maType=SMA, bounded=bounded, smooth=smooth)[xsubset] lines(1:NROW(xdata[xsubset]), sto, ...) } mapply(function(name, value) { assign(name, value, envir = lenv) }, names(list(nFastK=nFastK,nFastD=nFastD,nSlowD=nSlowD,maType=SMA, bounded=bounded, smooth=smooth, ...)), list(nFastK=nFastK,nFastD=nFastD,nSlowD=nSlowD,maType=SMA, bounded=bounded, smooth=smooth, ...)) exp - parse(text = gsub(list, add_stoch, as.expression(substitute(list(x = current.chob(), nFastK=nFastK,nFastD=nFastD,nSlowD=nSlowD,maType=SMA, bounded=bounded, smooth=smooth, ..., srcfile = NULL) plot_object - current.chob() lenv$xdata - stoch(Cl(plot_object$Env$xdata),nFastK=nFastK,nFastD=nFastD,nSlowD=nSlowD,maType=SMA, bounded=bounded, smooth=smooth)[,2] print(ls(lenv)) print(ls(plot_object$Env)) print(exp) plot_object$set_frame(sign(on) * abs(on) + 1L) plot_object$add(exp, env = c(lenv, plot_object$Env), expr = TRUE) print(names(plot_object)) plot_object } [[alternative HTML version deleted]] ___ 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.
[R-SIG-Finance] Don't miss: 6th R/Rmetrics Meielisalp Workshop 2012, June 24-28
1st Announcement Computational Finance and Financial Engineering 6th R/Rmetrics Meielisalp Workshop and Summer School Meielisalp, Lake Thune Switzerland, 24 June - 28 June 2012 *** R/Rmetrics 2012 - Don't miss it ! *** The workshop consists of Summer School-like tutorial sessions and a user/developer meeting. Both focus on topics from Computational Finance and Financial Engineering and on the use of R/Rmetrics in finance, insurance and related fields. The morning sessions have tutorials covering topics from multivariate data analysis, robust statistics, actuarial science and portfolio optimization. Some of the tutorials incorporate practical exercises Key Note Speaker - After Dinner Speech: Bill Alpert, Barron’s - The Dow Jones Business and Financial Weekly, New York, USA Catching Wall Street Bad Guys with R Tutorial Topics: * Professor Kurt Varmuza, Technical University of Vienna, Austria, Multivariate Data Analysis * Professor Andreas Ruckstuhl, ZHAW Zurich, and Dr. Martin Maechler, ETH Zurich and R Core Team, Switzerland Robust Data Analysis and Statistics * Professor Arthur Charpentier, University of Montreal Canada, and University of Rennes, France, Actuarial Science with R * Professor Thierry Roncalli, University of Evry and Lyxor Asset Management, France From Portfolio Optimization to Risk Parity * Professor Manfred Gilli, University of Geneva and Swiss Banking Institute, Switzerland Heuristic Optimization in Finance The afternoon sessions are dedicated to about 25 invited and contributed talks and presentations reflecting the wide range of fields in which R and Rmetrics are used in finance and insurance to analyze and model data. The goal is to bring together students, researchers, developers, practitioners, and users from finance and insurance providing a platform for common discussions and exchange of ideas. Call for Papers - Topics: We invite the submission of abstracts presenting innovations or exciting applications covering the whole spectrum of computational topics in finance, insurance and related fields. To submit an abstract, email your pdf file to submissions [at] rmetrics.org. Please keep abstracts to one page. The abstracts will become available in an online abstract booklet. Submission will be considered on a rolling admission basis. Participation: The workshop is limited to about 50 participants, therefore early registration is highly recommended. Scholarship for Students: A limited number of scholarships are available for full-time Bachelor and Master students that include a reduction on the accommodation fees (total accommodation fees would be 100.00 CHF). Please send a letter of motivation and a recommendation letter from your supervisor to submissions [at] rmetrics.org. Note that only complete applications send from an email address affiliated to an university will be accepted. Date: The registration desk will be open on Sunday June 24, from 4:00 to 6:00 pm. The event ends on Thursday June 28, after lunch about 2:00 pm. Organization: Organizier: Swiss Federal Institute of Technology, Zurich Co-organizier: Rmetrics Association Zurich Conference Chair: Diethelm Wuertz, Swiss Federal Institute of Technology, Zurich Conference Office: Yohan Chalabi and Tobias Setz, Swiss Federal Institute of Technology, Zurich Visit: http://www.rmetrics.org/meielisalp2012 http://www.rmetrics.org/meielisalp2012-registration We would very appreciate it to welcome you at the Meielisalp best wishes and kind regards Diethelm Wuertz ___ 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.