Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
New to algorithmic trading and seeking expertise on what might be a wild fantasy

Hello Quantopians!

I am new to algorithmic trading (and trading in general). I do not have much experience in programming other than some exposure to VB, agent-based modeling in NetLogo, and a little Javascript/PHP here and there. My background is purely theoretical in logic and some mathematics (particularly probability theory).

I have become interested in trading and have wondered if some of my theoretical ideas would be possible to implement in a computational framework. I was hoping that the knowledgeable Quantopian community might have some insight on things that I have been considering.

So I'll begin by sketching a strategy that I have in mind while posing some questions throughout.

First, can qualitative data---analyst opinions in particular---be accessed within the programming environment? I am not sure what the data source is for Quantopian, but I know that MarketWatch, Yahoo Finance, and various other sources of financial data provide qualitative opinions from analysts, e.g. "BUY", "HOLD", "SELL. If yes, great! If no, then let's suppose that in the future such data may be accessed.

Next, taking the data or the supposedly accessible future data, I would like to assign numerical values to each qualitative attitude (BUY, HOLD, SELL). Using numerical values, for each opinion O, compute the average of the values as the aggregated opinion, i.e. Sum(O1, O2,..,On) / n = V. The aggregated opinion could also be a weighted average where each opinion O is assigned a weight W. This might be useful if certain analysts or institutions are better or worse in forecasting.

The latter model is simple and should be easy to write in code. What I would want to do with this model is to execute a loop over a large set of stocks and return a list. The list would be organized by qualitative categories. To determine which category a stock S belongs to, we set threshold values (assigned by the user) where a threshold A sets the lowest aggregated opinion that one would be willing to accept as a "BUY" and a threshold R sets the highest aggregated opinion that one would be willing to reject as a "BUY". If Sum(O1, O2, ..., On) / n = V for any stock S and V is in the open interval (R,A), then the aggregated opinion would neither be sufficient to reject or accept as a "BUY" and consequently turns out to be a "HOLD".

Ultimately, the algorithm would produce a list covering a large set of stocks that would be impractical for an individual to go through and calculate the aggregated opinion for each member of the set. Additionally, the list would update in real time so that the user is provided with the most current information.

Of course, I don't think that this is the end of the story. Rather, further backtesting could be done with a group of stocks (ideally with the ones that are in the category "BUY"). The proposed strategy is just meant to provide one with a guide.

Does anyone know if something like this would be possible or has been done?

Obviously, I would need to get up to speed in programming before attempting something like the above, but I figured I would ask around before embarking on something that I am unsure of.

Thanks for reading!

4 responses

Hi,

My wife told me once she saw a person on TV who developed an Apple app based on this information. See the documentation where you can find such signals. You need to put them into a matrix and calculate your weights. An experienced Python programmer can do that in a couple of days or maybe hours? Give your programming skills a try by searching for wxamples based on this datafeeds/
J.

Hi Quant Trader,

Thanks for the suggestions! I just discovered this http://www.barchart.com/stocks/signals/top100 . The site basically provides what I am looking for, but I may go ahead and try to program something similar just for the experience.

Hi,

Maybe you can download this data through fetcher or some html library grabbing the data on a daily basis. There is a 'flipchart' button to download to Excel. You need to program authentication for it...and last but not least you do not have back test data.

I cannot find a link to the data Quantopian uses, QuantConnect uses StockPulse https://www.quantconnect.com/data/Sentiment#3.2.1 . You need to write in C# there, which is easier since you can do that offline with intellisense and C# is a managed strong-typed language so that you do not need to compile to find your errors. It is therefor much more reliable and faster to program. However, it does not focus on linear algebra like matrix calculations..and less community members to help. You can also install Visual Studio and install http://pytools.codeplex.com/ which will help you with the syntax. I have written somewhere a post how to install all the stuff on a Microsoft machine. The Microsoft IDE is top of the notch and free of charge by the way.

J.

Thanks for the QuantConnect link. It appears to offer what I am looking for.

I have used Visual Studio in the past and liked the IDE. But now I am using an older Mac that probably can't handle running Windows smoothly on a dual boot and so I won't be able to run Visual Studio.

I noticed that QuantConnect has some C# tutorials and I imagine that I can find tutorials elsewhere as well. So I'll see if I can get a grasp on the language through online education.

Thanks!