Re: [R-SIG-Finance] Older financials?

2015-11-25 Thread Mark Knecht
et. > > I'd be interested to hear if anyone has any other thoughts as well. My > apologies if my the comments above are not completely on topic. > > > > > Erol Biceroglu > > > *erol.bicero...@alumni.utoronto.ca > 416-275-7970 <416-275-7970>* > > On Mon, N

[R-SIG-Finance] Older financials?

2015-11-23 Thread Mark Knecht
I'm reading a book on quant value investing that wants to look at more financial data than I'm getting with the small program below. Looking at the getFinancials help page I'm not seeing anything that tells it to go back more than 4 years. Is there a way to do that with free data or is this a limit

Re: [R-SIG-Finance] Recipes for simple state-space models

2015-09-27 Thread Mark Knecht
I'm not where I can look at your work but I am certainly interested. Thanks in advance. Cheers, Mark On Sep 27, 2015 5:44 PM, "Paul Teetor via R-SIG-Finance" < r-sig-finance@r-project.org> wrote: > All: > I really like the power and flexibility of state-space models for time > series analysis, an

Re: [R-SIG-Finance] What's the best package for SOCP in R?

2015-07-10 Thread Mark Knecht
On Fri, Jul 10, 2015 at 6:58 AM, Mark Knecht wrote: > On Thu, Jul 9, 2015 at 9:03 AM, Pfaff, Bernhard Dr. > wrote: >> Dear Ilya & Alexios, >> >> given that the Alexios played the ball into my court, please find below a >> toy example to your problem: >> (

Re: [R-SIG-Finance] What's the best package for SOCP in R?

2015-07-10 Thread Mark Knecht
On Thu, Jul 9, 2015 at 9:03 AM, Pfaff, Bernhard Dr. wrote: > Dear Ilya & Alexios, > > given that the Alexios played the ball into my court, please find below a toy > example to your problem: > (the parma package is loaded for the data set) > > library(parma) > library(cccp) Sadly, library(parma

Re: [R-SIG-Finance] Monthly Midpoint return

2015-06-17 Thread Mark Knecht
On Wed, Jun 17, 2015 at 7:23 AM, Phil Steel wrote: > > > > Hi Brian and everybody else, > its downloaded stock prices I want to transform to middle of month stock > price. > endpoints give end of month doesn't it?if Im using endpoints I get a really > strange result with a lot of NA:s My Data st

Re: [R-SIG-Finance] RFC: quantmod::getSymbols.MySQL

2015-04-28 Thread Mark Knecht
On Tue, Apr 28, 2015 at 6:51 AM, Joshua Ulrich wrote: >> Should all of the fixes for these MySQL issues have migrated to CRAN >> by now? I'm still running >> my old code daily without using MySQL due to messages like this: >> > Yes, all the fixes mentioned above are on CRAN. > >> [1] "From MySQL

Re: [R-SIG-Finance] RFC: quantmod::getSymbols.MySQL

2015-04-28 Thread Mark Knecht
On Thu, Jan 1, 2015 at 9:48 AM, Joshua Ulrich wrote: > To follow up with the solution I adopted in quantmod_0.4-3 (on CRAN as > of 2014-12-15): I moved all the necessary Defaults functionality > directly to quantmod. This did not include Defaults' ability to > modify other package's namespaces, s

Re: [R-SIG-Finance] Problem using Quantmod and MySQL

2015-03-30 Thread Mark Knecht
On Mon, Mar 30, 2015 at 9:59 AM, Joshua Ulrich wrote: > On Mon, Mar 30, 2015 at 11:49 AM, Mark Knecht wrote: >> On Mon, Mar 30, 2015 at 9:25 AM, Joshua Ulrich >> wrote: >>> On Sun, Mar 29, 2015 at 5:37 PM, Joshua Ulrich >>> wrote: >>>> On

Re: [R-SIG-Finance] Problem using Quantmod and MySQL

2015-03-30 Thread Mark Knecht
On Mon, Mar 30, 2015 at 9:25 AM, Joshua Ulrich wrote: > On Sun, Mar 29, 2015 at 5:37 PM, Joshua Ulrich > wrote: >> On Sun, Mar 29, 2015 at 1:50 PM, Ueli Hofstetter >> wrote: >>> I have some problems loading symbols from an mysql db using getSymbols. >>> >>> Instead of repeating the issue, here

Re: [R-SIG-Finance] Problem using Quantmod and MySQL

2015-03-29 Thread Mark Knecht
On Sun, Mar 29, 2015 at 11:50 AM, Ueli Hofstetter wrote: > I have some problems loading symbols from an mysql db using getSymbols. > > Instead of repeating the issue, here is a link to the description on > stackoverflow > > http://stackoverflow.com/questions/2930/quantmod-error-loading-symbols

Re: [R-SIG-Finance] Signal and Rule question in Quantstrat

2015-02-01 Thread Mark Knecht
On Sun, Feb 1, 2015 at 6:31 AM, Joshua Ulrich wrote: > On Sun, Feb 1, 2015 at 8:20 AM, Mark Knecht wrote: >> On Sun, Feb 1, 2015 at 5:48 AM, Joshua Ulrich >> wrote: >>> On Fri, Jan 23, 2015 at 8:49 AM, Isak Engdahl >>> wrote: >>>> Dear members, &

Re: [R-SIG-Finance] Signal and Rule question in Quantstrat

2015-02-01 Thread Mark Knecht
On Sun, Feb 1, 2015 at 5:48 AM, Joshua Ulrich wrote: > On Fri, Jan 23, 2015 at 8:49 AM, Isak Engdahl wrote: >> Dear members, >> >> I have a questions how to set up the signals and rules correct for this >> stategy in Quantstrat. >> >> Price must be above SMA=250 and below the 20 line in the Slow

[R-SIG-Finance] Quantitative Trading with R: Understanding Mathematical and ...

2014-12-31 Thread Mark Knecht
I wonder if anyone has had a chance to read this book prior to it's availability on Amazon next week? http://www.amazon.com/gp/product/1137354070 It appears to be the author's first book. Cheers, Mark ___ R-SIG-Finance@r-project.org mailing list https

Re: [R-SIG-Finance] RFC: quantmod::getSymbols.MySQL

2014-10-29 Thread Mark Knecht
On Wed, Oct 29, 2014 at 7:36 AM, Mark Knecht wrote: > On Wed, Oct 29, 2014 at 6:38 AM, Zachary Deane-Mayer > wrote: >> Hi Mark, >> >> It'd be a little cumbersome, but couldn't you also source() an R script at >> the start of your session that loads the pa

Re: [R-SIG-Finance] RFC: quantmod::getSymbols.MySQL

2014-10-29 Thread Mark Knecht
On Wed, Oct 29, 2014 at 12:30 PM, Paul Gilbert wrote: > > > On 10/29/2014 10:36 AM, Mark Knecht wrote: >> >> On Wed, Oct 29, 2014 at 6:38 AM, Zachary Deane-Mayer >> wrote: >>> >>> Hi Mark, >>> >>> It'd be a little cumbersome

Re: [R-SIG-Finance] RFC: quantmod::getSymbols.MySQL

2014-10-29 Thread Mark Knecht
On Wed, Oct 29, 2014 at 6:38 AM, Zachary Deane-Mayer wrote: > Hi Mark, > > It'd be a little cumbersome, but couldn't you also source() an R script at > the start of your session that loads the parameters from .my.cnf and passes > them to options()? > > Alternatively, maybe getSymbols.MySQL could l

Re: [R-SIG-Finance] RFC: quantmod::getSymbols.MySQL

2014-10-29 Thread Mark Knecht
On Wed, Oct 29, 2014 at 5:25 AM, Joshua Ulrich wrote: > As many of you know, the Defaults package was removed from CRAN on > 2014-10-03 at Jeff's request. This broke a fair bit of functionality > in quantmod, most of which I have addressed in recent commits on > R-Forge. > > One issue I have not

Re: [R-SIG-Finance] quantstrat - trailingStop offsets?

2014-10-13 Thread Mark Knecht
On Mon, Oct 13, 2014 at 7:52 AM, Brian G. Peterson wrote: > On 10/13/2014 09:29 AM, Mark Knecht wrote: >> >> Good morning, >> Base question: Are there any quantstrat examples showing how to set >> a minimum profit target before a trailing stop kicks in? >> &g

Re: [R-SIG-Finance] quantstrat - trailingStop offsets?

2014-10-13 Thread Mark Knecht
On Mon, Oct 13, 2014 at 7:29 AM, Mark Knecht wrote: > Good morning, >Base question: Are there any quantstrat examples showing how to set > a minimum profit target before a trailing stop kicks in? > >For example, for a risk stop of 5% and a trailing stop of 3%, I >

[R-SIG-Finance] quantstrat - trailingStop offsets?

2014-10-13 Thread Mark Knecht
Good morning, Base question: Are there any quantstrat examples showing how to set a minimum profit target before a trailing stop kicks in? For example, for a risk stop of 5% and a trailing stop of 3%, I don't want to the trailing stop to be executed until I have met a minimum profit of at le

Re: [R-SIG-Finance] Talking to C# API (Any reference to learn the same)

2014-10-11 Thread Mark Knecht
>>> I want to output say 4 variables from each of the R codes back to C# >>> execution engine >> I think you want to look at the Rcpp package. I've not used it myself >> but it seems to address your interface issue. >> > No, it doesn't. C++ != C# (they're not even close; C# is closer to Java).

Re: [R-SIG-Finance] Talking to C# API (Any reference to learn the same)

2014-10-11 Thread Mark Knecht
On Sat, Oct 11, 2014 at 8:13 AM, Kunal Shah wrote: > Hello, > > I have 250 R scripts. > > *Input* > Each of them needs a real time data feed from a C# interface. The real time > datafeed updates at a speed of approx 3 times a second. Also the data array > size is increasing every minute. (1 minute

Re: [R-SIG-Finance] quantstrat - model transactions on specific dates

2014-10-09 Thread Mark Knecht
On Thu, Oct 9, 2014 at 2:16 PM, Brian G. Peterson wrote: > On 10/09/2014 04:00 PM, Mark Knecht wrote: >> >> Best I can >> tell the applyStrategy.rebalance function rebalances individual stocks >> based on the last entry date of that stock but not, for instance, on a

Re: [R-SIG-Finance] quantstrat - model transactions on specific dates

2014-10-09 Thread Mark Knecht
On Thu, Oct 9, 2014 at 1:35 PM, Joshua Ulrich wrote: > On Thu, Oct 9, 2014 at 3:31 PM, Brian G. Peterson wrote: >> On 10/09/2014 03:05 PM, Mark Knecht wrote: >>> >>> I would like to do something in quantstrat like set up an initial >>> buy for all symbols

Re: [R-SIG-Finance] quantstrat - model transactions on specific dates

2014-10-09 Thread Mark Knecht
On Thu, Oct 9, 2014 at 1:05 PM, Mark Knecht wrote: > Hi, >I suspect I'm making this far more difficult than it needs to be, > however I've spent time looking on Stack Overflow and couldn't find an > answer. Hopefully someone here can point me in the right dir

[R-SIG-Finance] quantstrat - model transactions on specific dates

2014-10-09 Thread Mark Knecht
Hi, I suspect I'm making this far more difficult than it needs to be, however I've spent time looking on Stack Overflow and couldn't find an answer. Hopefully someone here can point me in the right direction. Thanks in advance. I would like to do something in quantstrat like set up an initia

Re: [R-SIG-Finance] 'Defaults' removed from CRAN? (2014-10-03)

2014-10-08 Thread Mark Knecht
On Wed, Oct 8, 2014 at 9:56 AM, G See wrote: > Out of curiosity, did you try _not_ changing your current code, but > instead adding library(Defaults) to the top of the script? It's not > ideal, but Defaults _is_ still available > (http://cran.r-project.org/src/contrib/Archive/Defaults/). That co

Re: [R-SIG-Finance] 'Defaults' removed from CRAN? (2014-10-03)

2014-10-08 Thread Mark Knecht
On Wed, Oct 8, 2014 at 9:27 AM, Daniel Cegiełka wrote: > Thank you for this information. This solves annoying problems that > have recently emerged in this topic, but as Mark pointed out, the > complete removal of Defaults may take much more time. > > Best regards, > Daniel For getSymbols.MySQL o

Re: [R-SIG-Finance] 'Defaults' removed from CRAN? (2014-10-03)

2014-10-08 Thread Mark Knecht
On Tue, Oct 7, 2014 at 7:14 PM, Joshua Ulrich wrote: > I just pushed an updated quantmod_0.4-2 to R-Forge. Most of the > Defaults-related issues have been addressed, except for > getSymbols.MySQL and setTA/unsetTA. Feedback would be much > appreciated. > -- > Joshua Ulrich | about.me/joshuaulr

Re: [R-SIG-Finance] Order book / mktdata cbind issue (offset?)

2014-10-06 Thread Mark Knecht
On Mon, Oct 6, 2014 at 7:39 AM, Mark Knecht wrote: > On Wed, Oct 1, 2014 at 7:28 AM, Mark Knecht wrote: > >> >> oB = getOrders(portfolio.st, stock.str, status="closed") >> >> Thanks in advance, >> Mark > > Ah, I now see what's going o

Re: [R-SIG-Finance] Order book / mktdata cbind issue (offset?)

2014-10-06 Thread Mark Knecht
On Wed, Oct 1, 2014 at 7:28 AM, Mark Knecht wrote: > > oB = getOrders(portfolio.st, stock.str, status="closed") > > Thanks in advance, > Mark Ah, I now see what's going on. Very cool. Cheers, Mark ___ R-SIG-Finance@r-

[R-SIG-Finance] Order book / mktdata cbind issue (offset?)

2014-10-01 Thread Mark Knecht
Hi, Using quantstrat-0.9.1632 I had the idea that I should be able to cbind mktdata & order book together to trace out what's happening in a strategy. I wanted to see the orders lined up against strategy indicators, signals & prices so that I could reconcile in my mind what's happening. Unfortun

Re: [R-SIG-Finance] quantstrat help - simple combine error using windows and walk.forward

2014-09-30 Thread Mark Knecht
On Tue, Sep 30, 2014 at 12:34 AM, Derek Wong wrote: > Hello, > > I have been able to reproduce this error in Ubuntu based system as well not > just on windows. I was wondering if anyone had any insights or ways to to > solve this or create a work around. If there is any additional information > y

Re: [R-SIG-Finance] How to download options data in R from a csv list of underlying stock symbols?

2014-09-28 Thread Mark Knecht
Start looking at getOptionChain On 9/28/14, Liu wrote: > Hello everyone, > > > I've recently joined this mailing list for quantstrat. I hope not to ask > repetitive question but I haven't googled any effective solutions yet. > > > I have a csv file containing 100 stock symbols. I want to download

Re: [R-SIG-Finance] tradeStats - Avg.Daily.PL/Med.Daily.PL question

2014-09-25 Thread Mark Knecht
On Thu, Sep 25, 2014 at 2:03 PM, Ilya Kipnis wrote: > For the record, dailyStats is not something that's exclusive to my packages. > It's a blotter function. Also, I highly recommend upgrading to the latest > R-forge TTR and blotter. A lot of the times that people can't get my code to > run usuall

Re: [R-SIG-Finance] tradeStats - Avg.Daily.PL/Med.Daily.PL question

2014-09-25 Thread Mark Knecht
ried running dailyStats a day or two ago and got nowhere with it but I'll see if I can't figure that out. A quick search shows that Ilya uses it in his IKTrading and DSTrading files so that should be enough to get me going. Thanks for the quick response. Cheers, Mark > Regards,

[R-SIG-Finance] tradeStats - Avg.Daily.PL/Med.Daily.PL question

2014-09-25 Thread Mark Knecht
Hi, The help file for tradeStats asks for feedback so here I am. Reproducible code is the macd.Rebalancing.R demo file with the symbol changed to "SPY" and these lines added at the end: oB = getOrders(portfolio.st, "SPY", status="closed") tS = t(tradeStats(portfolio.st)) pTS = perTradeStats(por

[R-SIG-Finance] Duplicated indexes in blotter

2014-09-19 Thread Mark Knecht
In the attached code I have 3 transactions on the same date for the symbol IVOG. When I go to roll up position values this is leading to duplicate indexes in my xts objects and NA's in other columns, such as in tempPos.Value: 2014-05-05 55182 45420.0 2014-05-06 54702 45135.0 2014-05-07 63945 68

Re: [R-SIG-Finance] An easy way to run the quantstrat faber.R demo within an R function?

2014-09-11 Thread Mark Knecht
On Thu, Sep 11, 2014 at 5:26 AM, Andre Mikulec wrote: > > > Hi, > > I am trying to run the faber.R demo within a function > > Here is the url > https://r-forge.r-project.org/scm/viewvc.php/pkg/quantstrat/demo/faber.R?view=markup&root=blotter > > > Within a function, when the 'faber.R code reaches

Re: [R-SIG-Finance] quantstrat - problems adding multiple indicators

2014-09-10 Thread Mark Knecht
On Wed, Sep 10, 2014 at 10:06 AM, Brian G. Peterson wrote: > This has been discussed on this list multiple times. > > TTR is taking the column namees of your market data and appending the > indicator. > > so: > > Cl(mktdata) > > will return multiple columns after the first indicator has been appli

[R-SIG-Finance] quantstrat - problems adding multiple indicators

2014-09-10 Thread Mark Knecht
Hi, This started out as me essentially rewriting Guy Yollin's quantstrat3 demo over by hand as a learning exercise. That worked fine. I then wanted to add an addition moving average filter (50 day above 200 day) and figure out how to add indicators & write the signals, etc., to make that work. H

Re: [R-SIG-Finance] Errors with Quanstrat-IV Demo

2014-09-08 Thread Mark Knecht
Guy, Other than some warning messages in RStudio about only supporting a single graphics I can confirm that the WFA demo at least runs to completion and generates some charts. Thanks for your work! Cheers, Mark On Sat, Sep 6, 2014 at 4:35 PM, Guy Yollin wrote: > George, > > I just poste

Re: [R-SIG-Finance] Need help getting stop-loss and take-profit orders to work with indicators

2014-08-06 Thread Mark Knecht
I'm trying to set a stop loss on the second SMA. I >> removed all of my additional functions. It's probably user error on my >> part, but I'm simply asking how I achieve what I'm trying to do. >> >> Thanks. >> >> -Ilya >> >> On Wed,

Re: [R-SIG-Finance] Need help getting stop-loss and take-profit orders to work with indicators

2014-08-06 Thread Mark Knecht
On Wed, Aug 6, 2014 at 9:37 AM, Joshua Ulrich wrote: > On Wed, Aug 6, 2014 at 11:32 AM, Ilya Kipnis wrote: >> Mark, >> >> Are you using an outdated version of TTR? Josh had the same problem >> when he tried my demo. >> > It's not "outdated", it's just not the development version on R-Forge. > Ple

Re: [R-SIG-Finance] Need help getting stop-loss and take-profit orders to work with indicators

2014-08-06 Thread Mark Knecht
On Tue, Aug 5, 2014 at 3:47 PM, Ilya Kipnis wrote: > Mark, > > Thanks for getting back to me. Since I'm using gmail, I didn't have any line > wraps. However, I'm attaching my demo as an R file. Fixed the little typo. > > Thanks so much. > > -Ilya > When using gmail ensure you have 'plain text' se

Re: [R-SIG-Finance] Need help getting stop-loss and take-profit orders to work with indicators

2014-08-05 Thread Mark Knecht
On Tue, Aug 5, 2014 at 2:58 PM, Ilya Kipnis wrote: > Okay, so my issue is that I'm trying to debunk a trading system I found > online, and it involves using an indicator for a stop-loss and a > take-profit type of order. I based my syntax on the luxor demo, aside from > using an order.price argume

Re: [R-SIG-Finance] Kalman Filter Implementation in R

2014-06-16 Thread Mark Knecht
On Mon, Jun 16, 2014 at 2:21 AM, Manuj Goel wrote: > Hello everyone, > > I am an applied statistics post-graduate student and am doing my > dissertation on kalman filters and its application on financial models. I > have read quite a lot papers on kalman filters and I am able to understand > their

Re: [R-SIG-Finance] Time Varying Higher Moments - racd?

2014-05-28 Thread Mark Knecht
Mark, > > Have you tried passing “build_vignettes=FALSE” to install_bitbucket? Else I > think violet comes from the xcolor package. > > Alexios > > On 28 May 2014, at 18:35, Mark Knecht wrote: > >> Thanks Alexios. "jsu" returns a solution quickly. The sigma and

Re: [R-SIG-Finance] Time Varying Higher Moments - racd?

2014-05-28 Thread Mark Knecht
t; > You are probably using the nig or ghyp distributions which do not have a > closed form quantile function so it is evaluating it for every point (which > is expensive!). Try the jsu distribution instead...it is very flexible and > fast to evaluate. > > Best, > > Alexios &

Re: [R-SIG-Finance] Time Varying Higher Moments - racd?

2014-05-28 Thread Mark Knecht
thing but OSX Mavericks...I may > remove it going forward and use the base implementation to avoid too > many problematic dependencies, but would welcome any feedback on speed > comparisons. > > Best, > > Alexios > > On 27/05/2014 21:43, Mark Knecht wrote: >> On Tue,

Re: [R-SIG-Finance] Time Varying Higher Moments - racd?

2014-05-27 Thread Mark Knecht
On Tue, May 27, 2014 at 12:59 PM, alexios ghalanos wrote: > Since 2013 the development repository for my packages has moved (a > couple of time). See: > http://www.unstarched.net/r-downloads/ > for latest details. > > -Alexios Thanks Alexios. I started reading that based on Pierre's response but

[R-SIG-Finance] Time Varying Higher Moments - racd?

2014-05-27 Thread Mark Knecht
In this presentation: http://www.rinfinance.com/agenda/2013/talk/AlexiosGhalanos.pdf there is a bit of code on page 16 (and copied below) that loads a library called racd. I cannot seem to find racd. Can someone point me in the right direction? Thanks, Mark library(racd) library(rugarch) data

Re: [R-SIG-Finance] simple GARCH model

2014-04-21 Thread Mark Knecht
On Mon, Apr 21, 2014 at 7:15 AM, Mark Knecht wrote: > >> n <- length(y) > > > > Tried running your code here. y is undefined. Fix that for a start. > > HTH, > Mark Additionally, it looks like when you call nl, at the bottom: fit2 <- nlm(GarchLog

Re: [R-SIG-Finance] simple GARCH model

2014-04-21 Thread Mark Knecht
> n <- length(y) Tried running your code here. y is undefined. Fix that for a start. HTH, Mark ___ 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, subscr

Re: [R-SIG-Finance] Time Series Data Analysis of Financial Data

2014-03-03 Thread Mark Knecht
On Mon, Mar 3, 2014 at 7:26 AM, Kapil Shukla wrote: > Thanks Mark for such a quick reply. I follow the following steps > > 1. hourly_bid <- read.table("ech14_hourly_bid.csv", header=TRUE, sep=",", > stringsAsFactors =FALSE) > 2. This is how top 10 rows of my data look like. > > Date

Re: [R-SIG-Finance] Time Series Data Analysis of Financial Data

2014-03-03 Thread Mark Knecht
On Mon, Mar 3, 2014 at 7:04 AM, Kapil Shukla wrote: > Hi All > > I am totally new to R so this question may sound basic to many of you. I am > trying to use R for time series analysis of some financial instruments. > Currently i have hourly data of a stock which has OPEN/HIGH/LOW/CLOSE in a > CSV

Re: [R-SIG-Finance] meaning of IBroker mktData information

2014-02-28 Thread Mark Knecht
On Fri, Feb 28, 2014 at 12:14 PM, Stephen Choularton wrote: > Hi Brian > > I would imagine anyone using IB data would discover the problem I did on > first use. If not they are being a bit too trusting in their data which > should never be taken simply on face value. > > Clearly others have come

Re: [R-SIG-Finance] Errors in assetsFit function of fPortfolio package

2014-01-30 Thread Mark Knecht
On Thu, Jan 30, 2014 at 5:41 PM, Mohammad Nikzad wrote: > Dear Sir/Madam > > I get an error when I run a assetsFit function of fPortfolio package. > > You just need to load the fPortfolio package and run this command to get > the same error that I get. The only fitting method that works is "norm"

Re: [R-SIG-Finance] RMySQL returning too much data?

2014-01-07 Thread Mark Knecht
On Tue, Jan 7, 2014 at 9:34 AM, Joshua Ulrich wrote: >>It hadn't occurred to me that an input to getSymbols would be >> passed to src=yahoo but not to src=MySQL but that's fine now that I >> know. It does seem a bit non-intuitive from a design & documentation >> POV but I'm happy that it's no

Re: [R-SIG-Finance] RMySQL returning too much data?

2014-01-07 Thread Mark Knecht
On Tue, Jan 7, 2014 at 9:16 AM, Joshua Ulrich wrote: > Hi Mark, > > On Tue, Jan 7, 2014 at 10:00 AM, Mark Knecht wrote: >> Using the code attached it appears to me that RMySQL is not paying >> attention to the from=/to= date ranges the way getSymbols does when >> going

[R-SIG-Finance] RMySQL returning too much data?

2014-01-07 Thread Mark Knecht
Using the code attached it appears to me that RMySQL is not paying attention to the from=/to= date ranges the way getSymbols does when going to Yahoo. WIth Yahoo I get the range I requested. With MySQL I seem to get whatever range I have stored in the MySQL database. When I run with UseMySQL = FAL

Re: [R-SIG-Finance] Dates not formatting properly for quarterly time series in xtsExtra

2014-01-06 Thread Mark Knecht
On Mon, Jan 6, 2014 at 4:25 PM, Eric Zivot wrote: > I have been working on some examples of plotting time series for my new book > Modeling Financial Time Series with R and I noticed something funny with > plot.xts() from the R package xtsExtra when trying to plot quarterly time > series created f

Re: [R-SIG-Finance] getSymbols fails for Yahoo symbols

2014-01-03 Thread Mark Knecht
That's what I'm seeing here also but was afraid to say anything in jinx it. ;-) On Fri, Jan 3, 2014 at 10:07 AM, Paul Gilbert wrote: > It seems that chart.yahoo.com has returned to service. > > Paul > > ___ R-SIG-Finance@r-project.org mailing list htt

Re: [R-SIG-Finance] get.hist.quote with Yahoo No Longer Works?

2014-01-01 Thread Mark Knecht
Dirk, I far prefer your groovy ideas and where I got to using them than what I did yesterday. In the case of quantmod::getSymbols the problem isn't the direct function but rather the 'sub'-function getSymbols.yahoo, so using your idea I do: getSymbols.MWK = getSymbols.yahoo fix(getSymbols.MWK)

Re: [R-SIG-Finance] getSymbols fails for Yahoo symbols

2013-12-31 Thread Mark Knecht
Mark, Thanks for sharing this solution. As written it does work fine here but seemed to leave a symbol file behind in /tmp so I added file.remove(file) after the assign statement to take care of that. Cheers, Mark On Tue, Dec 31, 2013 at 11:40 AM, markbreman . wrote: > Hi Ivan, > > I notice

Re: [R-SIG-Finance] getSymbols fails for Yahoo symbols

2013-12-31 Thread Mark Knecht
On Tue, Dec 31, 2013 at 12:50 PM, Joshua Ulrich wrote: >> How does one install the new version? The standard command I've used >> for other packages >> >> install.packages("quantmod", repos = "http://R-Forge.R-project.org";) >> >> installs 0.4.1 which is likely the stable version I suppose. >> >

Re: [R-SIG-Finance] getSymbols fails for Yahoo symbols

2013-12-31 Thread Mark Knecht
On Tue, Dec 31, 2013 at 12:06 PM, Joshua Ulrich wrote: > Ivan, > > On Tue, Dec 31, 2013 at 1:26 PM, Ivan Popivanov > wrote: >> Looks like Yahoo have stopped providing web interface via chart.yahoo.com, >> which is used by getSymbols.yahoo. The site used to download data through >> the web interfa

Re: [R-SIG-Finance] RMySQL - setDefaults requires clear text name/password?

2013-12-20 Thread Mark Knecht
On Fri, Dec 20, 2013 at 3:16 PM, Mark Knecht wrote: > 2) The larger problem is that it needs a function called > convert.time.series. I don't know where that comes from but I suspect > it has something to do with the "" I > see when I print out the function (see se

Re: [R-SIG-Finance] RMySQL - setDefaults requires clear text name/password?

2013-12-20 Thread Mark Knecht
On Fri, Dec 20, 2013 at 1:49 PM, Paul Gilbert wrote: > I think there is some "system-level magic" that getSymbols.MySQL is > breaking. The MySQL driver will actually find the information in the .my.cnf > file if it is called without user and password, but the code does not try > that: > > > >>

Re: [R-SIG-Finance] RMySQL - setDefaults requires clear text name/password?

2013-12-20 Thread Mark Knecht
On Fri, Dec 20, 2013 at 11:03 AM, Mark Knecht wrote: > I'm using RMySQL saving data from Yahoo. It's working nicely, but as > best I can tell the setDefaults function seems to require me to put > the MySQL account name and password in clear text in my R program > which I

[R-SIG-Finance] RMySQL - setDefaults requires clear text name/password?

2013-12-20 Thread Mark Knecht
I'm using RMySQL saving data from Yahoo. It's working nicely, but as best I can tell the setDefaults function seems to require me to put the MySQL account name and password in clear text in my R program which I don't like. I.e. - the one commented out below works, the one currently not commented ou

Re: [R-SIG-Finance] Unreliable Yahoo downloads, so possibly save/reread using MySQL?

2013-12-18 Thread Mark Knecht
NGE COLUMN `", MySymbols [i], "_Close` `c` DOUBLE NULL > DEFAULT NULL, > CHANGE COLUMN `", MySymbols [i], "_Volume` `v` DOUBLE NULL > DEFAULT NULL, > CHANGE COLUMN `",MySymbols[i],"_Adjusted` `a` DOUBLE NULL > DEFAULT;&q

Re: [R-SIG-Finance] Unreliable Yahoo downloads, so possibly save/reread using MySQL?

2013-12-05 Thread Mark Knecht
On Thu, Dec 5, 2013 at 4:59 PM, Cedrick Johnson wrote: > Mark- > Here's what I do in a automated fashion for downloading data from Yahoo post > close (and storing into a mysql DB). The code may be a bit crummy (I cringe > at my ALTER TABLE query but it works well for the 100 or so things I downl

[R-SIG-Finance] Unreliable Yahoo downloads, so possibly save/reread using MySQL?

2013-12-05 Thread Mark Knecht
Hi, I read an ETF rotation paper a few weeks ago on Seeking Alpha and thought I'd play with the ideas in R. Without pointing any fingers (at Yahoo) I find that downloading adjusted data to be highly unreliable, especially in the middle of the work day. The following code snippet is, at the time

Re: [R-SIG-Finance] quantstrat: "Error in initPortf"

2013-12-01 Thread Mark Knecht
On Sat, Nov 30, 2013 at 10:27 PM, GiuseppeL wrote: > Hi,I am studing Guy Yolin's examples (quantstrat-I.Rnw) and I wonder > if someone can help me with this error message " > > Error in initPortf("buyHold", "SPY", initDate = "1997-12-31") : > Portfolio buyHold already exists, use updatePortf() o

Re: [R-SIG-Finance] ploting time series

2013-11-26 Thread Mark Knecht
On Tue, Nov 26, 2013 at 8:13 AM, fernando wrote: > Hi Mark, > > An example would be the following code > > x <- c("1jan1997", "2jan1997", "3jan1997", "4jan1997") > y <- c(-.3, 0.2, -0.2, 0.3) > date <- as.Date(x, "%d%b%Y") > plot(date,y, type="l", ylim=c(-0.32,0.32)) > segments(1,-.2,4,-.2) # I wa

Re: [R-SIG-Finance] ploting time series

2013-11-24 Thread Mark Knecht
On Sun, Nov 24, 2013 at 3:05 PM, fernando wrote: > Please, > I am ploting a time series in which the x-axis are dates. > How to use the "segments" in this graph? > Thanks > If you will provide R code for a very small example case then you'll likely get an answer that works for you. Cheers, Mark

Re: [R-SIG-Finance] R-3.0.2 - FinancialInstrument/blotter/quantstrat

2013-11-13 Thread Mark Knecht
On Wed, Nov 13, 2013 at 11:21 AM, Brian G. Peterson wrote: > It should be very simple in linux. > > from a shell: > > ## > > svn checkout svn://svn.r-forge.r-project.org/svnroot/blotter/ > > # will create a 'blotter' directory below the directory > # you ran the command from. > # > #then > > c

[R-SIG-Finance] R-3.0.2 - FinancialInstrument/blotter/quantstrat

2013-11-13 Thread Mark Knecht
Hi, Are these install failures temporary, in the sense they'll be fixed in a day or two, or is there a more long term problem here? I run R-3.0.2 in both Gentoo Linux & Windows 7. I'm unable to get quantstrat this morning in either environment. In Linux I cannot get FinancialInstrument or bl

Re: [R-SIG-Finance] RQuantLib/Quantlib for R-3.0.2 (Linux) ?

2013-11-02 Thread Mark Knecht
On Sat, Nov 2, 2013 at 12:07 PM, Dirk Eddelbuettel wrote: > > Mark, > | My problem is Quantlib doesn't seem to be available through the normal > | CRAN mirror I use. (Either USA CA 1 or USA CA 2) Do I need to look > | somewhere else to find this? > > Did you consider Googling this? > I did. > Y

[R-SIG-Finance] RQuantLib/Quantlib for R-3.0.2 (Linux) ?

2013-11-02 Thread Mark Knecht
I wanted to install RQuantLib inside of R-Studio on my Gentoo Linux machine running R-3.0.2 however the install fails complaining about needing Quantlib: checking whether g++ accepts -g... (cached) yes checking for R... yes checking for Rscript... yes checking for quantlib-config... no configure:

Re: [R-SIG-Finance] Simple portfolio management - anything in R?

2013-10-25 Thread Mark Knecht
On Fri, Oct 25, 2013 at 10:21 AM, Peter Carl wrote: >> every time I start looking at those things I glaze over... > I recommend a double espresso. Then: > > library(blotter) > ?blotter > > In the example provided, you can see your starting point: > ?getSymbols > ?initPortf > ?addTxns > ?updatePor

Re: [R-SIG-Finance] Simple portfolio management - anything in R?

2013-10-25 Thread Mark Knecht
On Fri, Oct 25, 2013 at 8:48 AM, Peter Carl wrote: > Consider blotter, which is specifically for calculating P&L from trades > and prices (for generating returns for analysis in PerformanceAnalytics). > > install.packages("blotter", repos="http://R-Forge.R-project.org";) > > pcc > -- > Peter Carl

[R-SIG-Finance] Simple portfolio management - anything in R?

2013-10-25 Thread Mark Knecht
Hi, Really unformed question here. Sorry about that but I'm just poking around looking for answers/ideas. Thanks in advance. In the last year I've put some money in some a few managed accounts for long term investing. Current these accounts hold 70-80 different stocks & ETFs. While the inves

Re: [R-SIG-Finance] Crosses above, crosses below

2013-10-02 Thread Mark Knecht
On Wed, Oct 2, 2013 at 9:02 AM, Joshua Ulrich wrote: >> > Your original question only asked about a cross above. If you want to test > for a cross below, you need to test EMA.10 < EMA.20. > > If you want both crosses in one column, you can combine them by checking > when the diffs of the logical

Re: [R-SIG-Finance] Crosses above, crosses below

2013-09-30 Thread Mark Knecht
On Fri, Sep 27, 2013 at 5:52 PM, Mark Knecht wrote: > On Fri, Sep 27, 2013 at 5:33 PM, Joshua Ulrich > wrote: >> On Fri, Sep 27, 2013 at 7:17 PM, Mark Knecht wrote: >>> Only slightly financial. Is there a function somewhere that implements >>> a real crossing chec

Re: [R-SIG-Finance] Crosses above, crosses below

2013-09-27 Thread Mark Knecht
On Fri, Sep 27, 2013 at 5:33 PM, Joshua Ulrich wrote: > On Fri, Sep 27, 2013 at 7:17 PM, Mark Knecht wrote: >> Only slightly financial. Is there a function somewhere that implements >> a real crossing check, as in MA1 crosses above MA2 and not just >> MA1>MA2?. TTR seeme

[R-SIG-Finance] Crosses above, crosses below

2013-09-27 Thread Mark Knecht
Only slightly financial. Is there a function somewhere that implements a real crossing check, as in MA1 crosses above MA2 and not just MA1>MA2?. TTR seemed a likely candidate but I haven't found it there. I alsa tried sos's findFn for searching, as well as stackoverflow but it seems too general a

Re: [R-SIG-Finance] Creating trading reports in pdf?

2013-08-13 Thread Mark Knecht
On Mon, Aug 12, 2013 at 1:07 PM, Daniel Cegiełka wrote: > Hi Mark, > > http://timelyportfolio.blogspot.com/2013/03/one-pager-performance-report-with-knitr.html > > http://timelyportfolio.blogspot.com/2013/03/production-quality-report-with-r-and.html > > Best regards, > Daniel Daniel, Thanks fo

[R-SIG-Finance] Creating trading reports in pdf?

2013-08-12 Thread Mark Knecht
Hi, Very generic question. I've developed some R code that trades stocks on daily bars. The R code takes about 10-15 minutes to run on 5 years of data, generates a few charts, a few data.frames, a few matrices, etc. I'd like to find a way to get this stuff into a single, esthetically readabl

[R-SIG-Finance] Range intersections

2013-07-26 Thread Mark Knecht
For the sake of asking here assume I have 5 models that attempt to predict a pair of future values like tomorrow's high & low. The predictions are placed in a matrix with the low prediction in column 1 and the high prediction in column 2. _IF_ there is an intersection of all 5 predictions then I ca

[R-SIG-Finance] day/month/year functions?

2013-07-22 Thread Mark Knecht
Hi, I've got a piece of old code I'm trying to resurrect which contains this function to convert R dates to TradeStation dates: function (MyDate) { ThisDay = day(MyDate) ThisMonth = month(MyDate) ThisYear = year(MyDate) TSDate = (ThisYear - 1900)*1 + ThisMonth*100 + ThisDay return(TSDate) }

Re: [R-SIG-Finance] Do the blotter demos work?

2013-07-22 Thread Mark Knecht
On Mon, Jul 22, 2013 at 4:27 PM, G See wrote: > Looks like it's built on r-forge. You should be able to install it with > > install.packages("blotter", repos="http://r-forge.r-project.org";) > > Regards, > Garrett Thanks Garrett, I installed as per your suggestion. No errors but I still see 0

Re: [R-SIG-Finance] Do the blotter demos work?

2013-07-22 Thread Mark Knecht
On Mon, Jul 22, 2013 at 3:14 PM, Jim Green wrote: > Mark, on windows you can use tortoise svn to checkout the trunk source code, > build and install if you don't want to wait > > the path is: > svn checkout svn://svn.r-forge.r-project.org/svnroot/blotter/ > > Jim Thanks Jim. As I'm focused on a l

Re: [R-SIG-Finance] Do the blotter demos work?

2013-07-22 Thread Mark Knecht
On Mon, Jul 22, 2013 at 2:38 PM, Joshua Ulrich wrote: > Jim, > > Thanks for noticing this. It was a separate issue in updateAcct that > was hidden by the timezone issue. Should be fixed in rev1484. > > Best, > -- > Joshua Ulrich | about.me/joshuaulrich > FOSS Trading | www.fosstrading.com H

[R-SIG-Finance] Do the blotter demos work?

2013-05-10 Thread Mark Knecht
Hi, I'm struggling to get any of the demos in the blotter package to work. Using a command such as: demo(longtrend, package="blotter") it runs along for a second and then fails with this message: + # Calculate P&L and resulting equity with blotter + updatePortf(ltportfolio, Dates = Cu

Re: [R-SIG-Finance] Issues about "maCross" demo in Quantstrat

2013-04-28 Thread Mark Knecht
On Sun, Apr 28, 2013 at 6:54 AM, John Han wrote: > > Hi, > > I ran the demo "maCross" successfully in R. When I enable the commented code, > it works also OK and I suppose to get both long and short position happening > in the backtesting result. > > > However, I can only see either long or shor

[R-SIG-Finance] quantStrat/blotter for R-3.0.0?

2013-04-25 Thread Mark Knecht
Hi, Is there a good home page or Wiki for how folks are approaching trading within R using quantStrat, TradeAnalytics, or something else? I'm working in RStudio/R-3.0-64-bit and am pretty much a putz when it comes to R programming. However I've started developing something that would never b

[R-SIG-Finance] Trying to get earth models to (better) match those from other tools

2013-04-15 Thread Mark Knecht
Hi, Does anyone have experience comparing the MARS models created in R using the earth package to those created in commercially available tools? I'm wondering about settings I might need to tweak to more closely match between the two. I'm currently attempting to build a model of a signal use

  1   2   >