Coder Social home page Coder Social logo

alpha-vantage-examples's Introduction

alpha-vantage-examples

Alpha Vantage Examples and Scripts that I will use in YouTube videos. Feel free to check them out.

My YouTube to see the videos: https://www.youtube.com/channel/UCJHs6RO1CSM85e8jIMmCySw

I left an API key in all these scripts so they would run out of the box. You'll need to get your own API key which can be found here: https://www.alphavantage.co/support/#api-key

1. Time Series Intraday

(Script provided by Alpha Vantage https://www.alphavantage.co/documentation/ )

Returns data on the intraday timeseries of a stock specified by the symbol keyword arguement in the ts.get_intraday method.

Time Series png found in Example-Images

Multiple output formats, pandas was selected in this script, close prices of each minute plotted with matplotlib https://github.com/Derrick-Sherrill/alpha-vantage-examples/blob/master/timeseries_example.py

2. Simple Moving Average VS. Intraday Time Series

Combination of the technical indicators and time series API calls. Plotted against each other here:

Simple Moving Average Example

Simple moving average here being calculated by last 60 minutes. Adjust for own purposes.

https://github.com/Derrick-Sherrill/alpha-vantage-examples/blob/master/sma_vs_close.py

3. Exponential Moving Average

Calculating the EMA over each minute, using the last 60 minutes for the calculation.

Exponential Moving Average

https://github.com/Derrick-Sherrill/alpha-vantage-examples/blob/master/exponential_moving_average.py

4. Stoichastic Oscillator

Please note the below script was used on a stock, not a security. Demonstration purposes only.

Stochastic Oscillator Example

https://github.com/Derrick-Sherrill/alpha-vantage-examples/blob/master/stochastic_oscillator.py

5. Weighted Moving Average

Weighted moving average of Microsoft:

Weighted Moving Average

https://github.com/Derrick-Sherrill/alpha-vantage-examples/blob/master/weighted_moving_average.py

6. Relative Strength Index

RSI is a momentum indicator that that measures the magnitude of recent price changes to evaluate overbought or oversold conditions in the price of a stock or other asset.

Relative Strength Index

https://github.com/Derrick-Sherrill/alpha-vantage-examples/blob/master/relative_strength_index.py

7. RSI vs Close prices

Plotting RSI against closing prices on the same graph, two y axis.

Relative Strength Index vs Close

https://github.com/Derrick-Sherrill/alpha-vantage-examples/blob/master/rsi_vs_close.py

8. SMA plotted with RSI (Two TI's)

Plotting two technical indicators on the same graph using twinx() in matplotlib

SMA vs RSI Example

https://github.com/Derrick-Sherrill/alpha-vantage-examples/blob/master/sma_and_rsi.py

Sources

https://www.alphavantage.co/documentation/ Chen, James. “Relative Strength Index – RSI.” Investopedia, Investopedia, 10 June 2019, www.investopedia.com/terms/r/rsi.asp.

alpha-vantage-examples's People

Contributors

derrick-sherrill avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.