Git Product home page Git Product logo

quoctan / stock.indicators Goto Github PK

View Code? Open in Web Editor NEW

This project forked from daveskender/stock.indicators

0.0 0.0 0.0 516 KB

A multi-targeting .NET framework NuGet library that produces stock indicators. Send in stock quote history and get back the desired indicators. Nothing more. Current indicators include: Accumulation Distribution Line (ADL), Aroon, Average Directional Index (ADX), Average True Range (ATR), Beta Coefficient, Bollinger Bands, Chaikin Money Flow (CMF), Chaikin Oscillator, Chandelier Exit, ConnorsRSI, Commodity Channel Index (CCI), Correlation Coefficient, Donchian Channel, Double EMA, Exponential Moving Average, Heikin-Ashi, Keltner Channel, Moving Average Convergence/Divergence (MACD), On-balance Volume (OBV), Parabolic SAR, Rate of Change (ROC), Relative Strength Index (RSI), R-Squared, Simple Moving Average, Standard Deviation, Stochastic Oscillator, Stochastic RSI, Ulcer Index, William %R

Home Page: https://www.nuget.org/packages/Skender.Stock.Indicators

License: Other

C# 100.00%

stock.indicators's Introduction

Stock Indicators

NuGet package build status code coverage board status

Skender.Stock.Indicators is a multi-targeting .NET framework library that produces stock indicators. Send in historical stock price quotes and get back desired technical indicators (such as moving average, relative strength, parabolic SAR, etc). Nothing more.

It can be used in any kind of stock analysis software. We had private trading algorithms and charts in mind when originally creating this open library.

Installation and setup

Find and install the Skender.Stock.Indicators NuGet package into your Project. See more help for installing packages.

# dotnet CLI example
dotnet add package Skender.Stock.Indicators

# PowerShell example
Install-Package Skender.Stock.Indicators

Example usage

using Skender.Stock.Indicators;

[..]

// example: get 20-period simple moving average
IEnumerable<SmaResult> results = Indicator.GetSma(history,20);

Indicators and overlays

Helpful references

Prerequisite data

Most indicators require that you provide historical quote data and additional configuration parameters.

You can get historical quotes from your favorite stock data provider. Historical data is an IEnumerable of the Quote class. More info...

For additional configuration parameters, default values are provided when there is an industry standard. You can, of course, override these and provide your own values.

Frameworks targeted

  • .NET Core 3.1
  • .NET Standard 2.0, 2.1
  • .NET Framework 4.6.1

FAQ

Where can I get historical data?

There are many places to get stock market data. Check with your brokerage or other commercial sites. If you're looking for a free developer API, try Alpha Vantage.

How much historical data do I need?

Each indicator will need different amounts to calculate. You can find guidance on the individual indicator documentation pages. As a general rule of thumb, you will be safe if you provide 750 points of historical quote data (e.g. 3 years of daily data). A BadHistoryException will be thrown if you do not provide enough history.

Note that some indicators, especially those that are derived from Exponential Moving Average, use a smoothing technique where there is convergence over time. While you can calculate these with the minimum amount of data, the precision to two decimal points often requires 250 or more preceding historical records. For example, if you are using daily data and want one year of precise EMA(250) data, you need to provide 3 years of total historical quotes (1 extra year for the lookback period and 1 extra year for convergence); thereafter, you would discard or not use the first two years of results.

Do you have any documentation?

Yes. The documentation site is a GitHub Pages site here: https://daveskender.github.io/Stock.Indicators. It is automatically generated from the README.md files in this repository, so you can navigate from the above Indicators links too.

More questions? Contact us through the NuGet Contact Owners method or submit an Issue with your question if it is publicly relevant.

Contributing

This NuGet package is an open-source project. If you want to report or contribute bug fixes, new indicators, or feature requests, please review our contributing guidelines.

stock.indicators's People

Contributors

daveskender 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.