pub package popularity likes pub points

stock_market_data

Package to get base indicators from the stock and base stats like buy and hold CAGR and total drawdown. The objective of this package is to implement all the complicated math and calculation needed to start working with

Stock market data example screenshot Stock market data example screenshot with indicators

Features

Calculate buy and hold CAGR, Drawdown and MAR based on just a symbol Add indicators to YahooFinanceCandleData indicators map, indicators supported: SMA, EMA, RSI

This package works as a base for the functionality logic of turing deal. https://github.com/ivofernandes/turingDealApp

Android: https://play.google.com/store/apps/details?id=com.turing_deal

iOS: https://apps.apple.com/us/app/turingdeal-investing-portfolio/id1590934022

Getting started

Add the dependency to your pubspec.yaml:

stock_market_data: ^0.0.1

Usage for getting a buy and hold backtest

BuyAndHoldStrategyResult backTest = await StockMarketDataService().getBackTestResultForSymbol('GOOG');

Usage for getting candles with indicators

List<YahooFinanceCandleData> prices = await StockMarketDataService().getCandlesWithIndicators('GOOG', ['EMA_20', 'RSI_20']);

All supported indicators

  • SMA
  • EMA
  • RSI
  • BB
  • BOP
  • MFI
  • P
  • STDDEV
  • VWMA
  • %R

Usage for getting candles with all indicators

List<YahooFinanceCandleData> prices = await StockMarketDataService().getCandlesWithIndicators('GOOG', ['SMA_20,EMA_20,RSI_20,STDDEV_20,VWMA_20,BB_20,%R_20,MFI_14,BOP_14,P_1']);

Depends on:

yahoo_finance_data_reader to get data from yahoo finance https://pub.dev/packages/yahoo_finance_data_reader

Like us on pub.dev

Package url: https://pub.dev/packages/stock_market_data

Instruction to publish the package to pub.dev

dart pub publish

Libraries

stock_market_data