Quantitative Analysis?
Tags: python, datascience, beginners, machinelearning
Published: 2020-10-10 04:55:33

The Idea Of Writing This Story Came To Me After Watching [Darren Aronofsky's](https://en.wikipedia.org/wiki/Darren_Aronofsky) Movie [Pi(1998)](https://en.wikipedia.org/wiki/Pi_(film)) It Got Me Hooked To the Idea That There is a Secret Formula Of Succes In Stock Market But Needless To Say There Isn’t A Formula Like That. But Quantitative Analytics Comes Pretty Close To It. So In This Post, I’ll Give You An Introduction About Quantitative Analysis.
##What Is Quantitative Analysis?
![NYSE](https://miro.medium.com/max/875/1*uj_Uj7bV58HLIRgHcxDVLQ.jpeg "New York Stock Exchange")
To Understand What Quantitative Analysis Is You First Have To Understand What Does Stock Mean? And What It Means When Someone Says That They Own A Particular Stock?
A Stock Is Nothing But A Piece Of Paper Which States That You Own A Certain Part Of A Company. When You Buy A Stock You Own That Stock But In Return You Have To Give Money To That Particular Company This Is How A Company Raises Capital Or Money To Keep Their Operations Going and Keep Innovating.
In The Simplest Way, I Can Put This Is Being A Quantitative Analyst Means that You Analyze a Bunch Of Financial Data By Using Scientific Methods So That You Can Pick Out The Best Stock. So In Quantitative Analysis, We Study a Bunch Of Financial Data In Order To Pick Out The Best Stock And Predict The Future Of Stocks.

##What Does A Quantitative Analyst Do?
![](https://miro.medium.com/max/875/1*6fn9WI7WIOeaAC2PhWaSSQ.jpeg)

A Quantitative Analyst Analyze The Statistical Data About The Concerned Stocks Most Of The Time By Using Certain Programming Languages Like Python, C++, Or R The Analysts Use Statistical Models Like [Linear Regression](https://en.wikipedia.org/wiki/Linear_regression) And Use Methods Like [Ordinary Least Squares](https://en.wikipedia.org/wiki/Ordinary_least_squares). I’ll Show You Some Of the Analysis. Below You, Will See The Code And The Output Of that Code Which Gives Us The Scatter Matix Of Certain Stocks With [Kernel Density Estimate](https://en.wikipedia.org/wiki/Kernel_density_estimation) In Diagonal. Don’t Worry About The Results I’ll Explain It In The Next Post.
```python
pd.plotting.scatter_matrix(daily_pct_change,diagonal='kde',figsize=(15,15),alpha=0.1)
plt.show()
```
Output Of The Above Code
![Scatter Matrix](https://miro.medium.com/max/875/1*ZNOMBAcMrFQVphtUs8vtiQ.png "Scatter Matrix")

Here’s What An Ordinary Least Square Regression Results Looks Like.
```python
AAPL_returns=daily_log_returns.iloc[:,0]
GS_returns=daily_log_returns.iloc[:,3]
return_data=pd.concat([AAPL_returns,GS_returns],axis=1)[1:]
X = sm.add_constant(return_data['AAPL'])
model = sm.OLS(return_data['GS'],X).fit()
print(model.summary())
```
Output
![OLS Result](https://miro.medium.com/max/875/1*9vNXrlW_OoJm99Y3FwQZ6g.png "OLS Result")

As You Can See The OLS Gives Us Some Very Important Metrics Which We Can Use To Develop A Trading Strategy.

##What Is A Trading Strategy?

In Simple Words Trading Strategy Is A Fixed Plan About How You Approach Stocks Like [Short Selling](https://www.investopedia.com/ask/answers/how-does-one-make-money-short-selling/#:~:text=Short%20selling%20is%20a%20fairly,sell%20will%20drop%20in%20price.) Or Going For A Long Haul There Are Lots Of Trading Strategy Available Some Of Them Are Given Below.
1.[Moving Average Crossover](https://en.wikipedia.org/wiki/Moving_average_crossover)
2.[Dual Moving Average Crossover](https://www.wisdomtrading.com/public-trading-systems/dual-moving-average-crossover-trading-system/)
3.[Turtle Trading](https://www.investopedia.com/articles/trading/08/turtle-trading.asp)
4.[Mean Reversion Strategy](https://decodingmarkets.com/mean-reversion-trading-strategy/#:~:text=A%20mean%20reversion%20trading%20strategy%20involves%20betting%20that%20prices%20will,continue%20in%20the%20same%20direction.&text=A%20simplistic%20example%20of%20a,unusually%20large%20fall%20in%20price.)
And Many More…..
We’ll Talk About Each Trading Strategy In The Next Post.

##How To Get Started In Quantitative Analysis
To Get Started In Quantitative Analysis You Should Know A Little Bit About Statistics And Computer Science And You Should Know at least One Programming Language Like Python, C++, etc. In the Case Of Python, You Should Also Know About Various Libraries Like Pandas, Numpy, Matplotlib, etc. In The Case Of C++, There Is [C++ Boost Library](https://en.wikipedia.org/wiki/Boost_(C%2B%2B_libraries)), ML pack C++ Library These Libraries Are Necessary If You Want To Learn More About Quantitative Analysis.

I Would Like To Thanks [Datacamp](https://learn.datacamp.com/) For Their Courses.

I hope you found this Post On Quantitative Analysis useful!

**If you have any suggestions then please let me know.**

Follow Me On:
Github:[DataCrusade1999](https://github.com/DataCrusade1999)
Instagram:[Ashutosh Pandey](https://www.instagram.com/ashutosh_pandey1999/)