[R-SIG-Finance] clustering

2014-05-07 Thread BBands
Hello, Has anyone had any experience with clustering involving large numbers of series? For example kmeans() or hclust(). We maintain a database of 5000 stocks, 200 industry groups and 15 market sectors. The groups and sectors are calced by us and are equal weighted. We require both a fundamental

[R-SIG-Finance] index creation

2014-04-24 Thread BBands
Hi All, Is there are elegant way to create security indices in R? I am specifically thinking of things like equal-weighted industry group or market sector indexes. I can do it the brute force way, but I can't help but suspecting that there is a nice index constructor or something similar lying

Re: [R-SIG-Finance] How to interpret this formula?

2013-10-12 Thread BBands
I originally saw it this way, Actual/strike -1 which is the % in the money. I modified that to: if actual = strike then actual/strike -1 else strike/actual - 1 endif From a trading perspective that makes sense as it gives you the correct reversible round-trip distance, which is quite

Re: [R-SIG-Finance] Options solution?

2013-10-09 Thread BBands
That's interesting and I will explore. Thanks. My interest lies in really short-term options where often the BS values don't seem to make a lot of sense, so I am looking into different modeling methods. This was all inspired by the discovery of decent liquidity in the weekly options and the sort

Re: [R-SIG-Finance] Options solution?

2013-10-03 Thread BBands
Hi Jeff, I downloaded the source via svn, but I can't figure out how to install it into R. I tried: install.packages(/home/john/software/rgreeks-read-only/pkg, repos = NULL, type=source) without any luck. Hint please. Thanks, John On Tue, Aug 27, 2013 at 8:14 AM, BBands bba...@gmail.com

Re: [R-SIG-Finance] Options solution?

2013-10-03 Thread BBands
Got it now. Thanks, John On Thu, Oct 3, 2013 at 2:57 PM, BBands bba...@gmail.com wrote: Hi Jeff, I downloaded the source via svn, but I can't figure out how to install it into R. I tried: install.packages(/home/john/software/rgreeks-read-only/pkg, repos = NULL, type=source

Re: [R-SIG-Finance] Options solution?

2013-08-27 Thread BBands
Thanks Jeff, that looks interesting. I'll dig in soon. Was the lightning talk recorded? John On Sun, Aug 25, 2013 at 8:14 AM, Jeff Ryan jeff.a.r...@gmail.com wrote: Hi John, I have a package that isn't quite 'complete' that might be of use. https://code.google.com/p/rgreeks/

[R-SIG-Finance] Options solution?

2013-08-23 Thread BBands
The options solution I have used forever no longer works well, so I am looking for a new option analysis solution. My needs are rather simple, really all I want are nice PL graphs for option positions with a number of legs. Flexibility is key. I was thinking about Hoadley, which I have used on and

Re: [R-SIG-Finance] An experiment

2013-07-18 Thread BBands
, Jul 16, 2013 at 7:08 AM, Dirk Eddelbuettel e...@debian.org wrote: A little late as I was vacationing in Australia where by better half was attending a conference... On 11 July 2013 at 07:34, BBands wrote: | I posted the following to the Markets list earlier, as that is where | the seed came

[R-SIG-Finance] An experiment

2013-07-11 Thread BBands
, I will move this project to a collocated server in NY. I will report back on my progress, but this should take some time (perhaps a lot) as there is quite a bit to learn and code. Any pointers, tips on avoiding pratfalls, etc., greatly appreciated; either here or to BBands at BollingerBands dot

[R-SIG-Finance] Fwd: Turing's Cathedral

2013-06-23 Thread BBands
I'm reading George Dyson's Turing's Cathedral, ostensibly a history of the Princeton computer project circa 1945-1955, but more than anything else a biography of John von Neuman, the animating force behind the project. http://www.amazon.com/Turings-Cathedral-Origins-Digital-Universe/dp/1400075998

[R-SIG-Finance] Clustering

2013-06-22 Thread BBands
Good morning, I am interested in doing some work on clustering stocks and would like to chat with anyone who has had some experience in the area. I am primarily interested in creating industry groups from larger lists of stocks. We already do this is a semi numerical manner, so I have a lot of

[R-SIG-Finance] Generating a front month only Time Series for Futures Prices

2012-05-10 Thread BBands
I feel that reiterating my prior warning is worthwhile. The proper way to do this is to analyze the actual contracts and roll just as you would have to if you were actually trading; exit the current contact when the crowd moves enter the new actively-traded front month and account for each

Re: [R-SIG-Finance] Generating a front month only Time Series for Futures Prices

2012-05-03 Thread BBands
Beware, this is a mine field! For example, one problem you will need to deal with is that different commodities roll on different dates. Then there is the nightmare quagmire of back adjusting, which is best skipped altogether in my opinion. In short, there are many ways to get hurt here. There is

Re: [R-SIG-Finance] Donchian Channel in TTR

2012-04-13 Thread BBands
isn't the best design strategy in many cases. Secondly, most (all?) of the other functions in TTR behave by including the 'current' price in the calculation.  In the case of DonchianChannel the result of this is simply more obvious. e.g. EMA, SMA, Bbands, runMax, cumsum (base R), cummin (base R

Re: [R-SIG-Finance] Interesting behaviour in BBands

2012-04-13 Thread BBands
stergios_marinopou...@yahoo.com wrote: There's an interesting behavior in BBands when dn, mavg, and up are the same value.  Here's an example: library(quantmod); getSymbols(SPY, from=1993-01-31, to=1996-01-01 ) ; bb - BBands(Cl(SPY), n=3, sd=0.3, maType=EMA) ; bb[bb$pctB==Inf,]     dn

[R-SIG-Finance] Point and Figure Charting

2011-10-17 Thread BBands
There are a couple of web references available, but since pf is simply filtered waves/swings -- Art Merriill wrote elegantly on this topic -- why not use the zig-zag function in TTR?     jab On Mon, Oct 17, 2011 at 9:05 AM, veepsirtt veepsi...@gmail.com wrote:  Does anyone know of a good point

Re: [R-SIG-Finance] The Art of R Programming

2011-10-14 Thread BBands
I also note that O'Reilly is out with Getting Started with RStudio: An Integrated Development Environment for R by John Verzani. I've ordered mine, but I haven't seen it yet. http://shop.oreilly.com/product/0636920021278.do Best, John ___

[R-SIG-Finance] The Art of R Programming

2011-10-11 Thread BBands
by Norman Matloff My copy arrived today and at first glance it looks like a worthy addition to the R literature. While not explicitly finance oriented, it does look like it might be of interest to some on this list. Best, John ___

[R-SIG-Finance] Fwd: Test data

2011-09-30 Thread BBands
On Fri, Sep 30, 2011 at 6:43 AM, Maheshwari, Dhruv dhruv.maheshw...@blackrock.com wrote: I've been thinking a lot about Ralph Vince's comment on the Markets list about the arc sine law. Can you point me to this mailing list? I am interested in joining. Regards, Dhruv You can sign up for

Re: [R-SIG-Finance] Displaying candle data for thinly traded stocks

2011-09-29 Thread BBands
Please forgive me for stating the obvious, but... A candle is not defined for a period in which no trades occur. jab On Wed, Sep 28, 2011 at 12:15 PM, Stefan Petry spe...@quantbench.com wrote: I would appreciate some advice on how to best display candle data for sporadically traded

Re: [R-SIG-Finance] Test data

2011-09-29 Thread BBands
for testing any trading system. Horace -Original Message- From: r-sig-finance-boun...@r-project.org [mailto:r-sig-finance-boun...@r-project.org] On Behalf Of BBands Sent: Thursday, September 29, 2011 3:00 PM To: R-sig-finance Subject: Re: [R-SIG-Finance] Test data On Tue, Sep 27

Re: [R-SIG-Finance] SMA large n

2011-09-27 Thread BBands
On Tue, Sep 27, 2011 at 6:02 AM, Dirk Eddelbuettel e...@debian.org wrote: Maybe the magic number 377... That magic number is the 14th Fibonacci number, which raises an interesting question. Is there an R resource that allows one to enter a number and returns a list of which common number series

Re: [R-SIG-Finance] Add Bollinger Bands to Portfolio Equity Curve

2011-06-17 Thread BBands
On Thu, Jun 16, 2011 at 2:19 PM, Idris Raja idris.r...@gmail.com wrote: Hi all. I am trying to add Bollinger Bands to an equity curve of one of my own portfolios. Wherever did you get that idea? ;-) The first two areas beyond price which I explored using Bollinger Bands in were indicators --

[R-SIG-Finance] Expected lengths of streaks

2011-05-04 Thread BBands
On Tue, May 3, 2011 at 5:39 PM, Mark Leeds marklee...@gmail.com wrote: hi john: I'm not clear on whether you want expected value of the max length or the expected value of the length. but, if you want the latter in closed form and you know , p, the probability of sucess ( in your case , the

[R-SIG-Finance] Expected lengths of streaks

2011-05-03 Thread BBands
About 1,000 years ago I calculated the expected length of a losing streak by iterative simulation using rle trades - sample(c(W, L), 1000, replace = TRUE, prob = c(0.66, 0.33)) trades.rle - rle(trades) tapply(trades.rle$lengths, trades.rle$values, max) There must be other, better

[R-SIG-Finance] editors

2011-04-01 Thread BBands
Notepad++, my editor of choice for some years, dropped the Scientology bomb today. So it is time to move on as I'd prefer my editors to be without religion. I'd like an open-source, cross-platform editor with code folding, outlining, code completion for Python, R and other common languages and