
An Introduction to Stock Market Data Analysis with R – Part 1 - alecsx6
https://ntguardian.wordpress.com/2017/03/27/introduction-stock-market-data-r-1/
======
ktta
I don't have much experience with any kind of stock market analysis/ HFT
programming.

I've seen people use python (or R) a lot in online tutorials and courses
(there's one on coursera[1] check it out). It's understandable that python is
preferred since it's an easy language to get started with, but I've never
really seen C/C++ used by people online (Although I've heard about the use of
FPGAs by the hardcore guys)

Is the only reason C++ isn't recommended because it is difficult? The
performance difference seems rather large to me. And especially if you're
doing lots of number crunching, it would really benefit using C/C++ wouldn't
it?

Do people use them but I don't hear about them because anyone above 'tutorial
level' doesn't share their code or talk about it?

Or are the R and Python Computational libraries close to the performance of
C/C++ that it's a viable compromise?

[1]: [https://www.coursera.org/learn/computational-
investing](https://www.coursera.org/learn/computational-investing)

~~~
rampage101
People use Python for finance and time series because of how easy it to read
in the data. There is a library called pandas which allows you to read in a
txt, csv, or excel file easily and do any type of array manipulation you want.
The pandas library is written in C++, so it's basically a python wrapper.

Conversely I don't think C++ has this same type of library for reading in data
in a single line.

While C++ is faster than Python overall, for most financial simulations Python
is definitely fast enough.

~~~
jzwinck
The Pandas library is not written in C at all actually. You can view the
source here: [https://github.com/pandas-
dev/pandas/tree/master/pandas](https://github.com/pandas-
dev/pandas/tree/master/pandas)

It's mostly Python with a bit of Cython, and pull requests that are not pure
Python are more likely to be rejected. There's basically zero C++ in Pandas
itself.

------
fapjacks
> DISCLAIMER: THIS IS NOT FINANCIAL ADVICE!!! Furthermore, I have ZERO
> experience as a trader (a lot of this knowledge comes from a one-semester
> course on stock trading I took at Salt Lake Community College)!

This disclaimer is a good idea, but I'd have gone as far as saying that
getting into HFT as a hobbyist programmer is going to be throwing your money
into a giant hole.

~~~
csomar
I disagree, strongly. While the learning experience was super stressful and
expensive and had me on stress-drugs, the financial advantage was nothing but
insane. I'm a small time trader, started from 5 figures and now up to a good 6
figures of trading capital; and took close to a 6 figures of earnings already.

~~~
TheColorYellow
Really? I haven't many people to have claimed to have gotten an "insane"
financial advantage from the stock market, yet alone HFT. I've met a few but
none of them had such a positive reaction that it seemed worth investing a
significant amount of time.

Any advice?

~~~
csomar
Well, that's the catch. I'm very unlikely to give you any hints on what
markets I trade and the advantages I'm using. I'm also very unlikely to take
any person that does that very seriously (I really don't).

Also remember that this market (or any market with big money) is brutal and
will eat you alive. I don't expect the average person and his capital to last
for a long time.

~~~
fapjacks
Well that was the intent of my original comment, that your money is going to
disappear. Whether or not you stick around and continue throwing money into
the hole long enough to eventually end up at the bottom of someone else's hole
is a different matter, I think. _You_ are making money, but you persisted --
indeed, between stress drug prescriptions and visits to the doctor -- when I
think most hobbyist programmers will have wished they'd never started in the
first place.

~~~
csomar
Indeed. If anyone ask me if they should start trading, my reaction is "DON'T
DO IT". But that is for the average person and maybe software developer. For
people who have a fighter personality, good mathematical skills, good
programming skills, good economic skills, no kids/family and a nice pile of
cash, I think they have a chance.

~~~
user5994461
These people have no edge, they have the most to loose and the less likely to
risk much while not realizing the risks they are taking.

They should not trade.

------
empath75
Is there a similar article for analyzing stock fundamentals? (P/e, revenue,
etc)

~~~
cgmil
No, but I'm always looking for new content ideas. People like my R/Python for
Stocks posts, and ask for more, but I'm not really sure where to start in
terms of giving them what they want.

------
soheil
It'd be great if this was posted on Kaggle.

------
ccc111
Awesome article!

have you guys been on
[https://www.quantopian.com/](https://www.quantopian.com/)

very informative

very good blog statistic articles on top of backtesting

------
tempodox
You might just as well “analyze” dice rolls at the casino. Except that people
routinely lie to you when they want your money (in case you didn't know
already), there's no insight to be had. It is already a well established fact
that in gambling, the house always wins.

~~~
user5994461
> It is already a well established fact that in gambling, the house always
> wins.

I had a friend who used to run a financial exchange. That was his favorite
sentence.

The house always wins.

------
jdonaldson
You can still profit off of HFT, even if you can't compete directly. The key
is to find the opportunity they create: HFT will typically exit HARD on a
stock with weak earnings or bad news. They need to find a better short term
growth option. I like to find those situations, buy low, and hang on for a
year.

