All Projects → FlashBoys → Go Finance

FlashBoys / Go Finance

Licence: mit
⚠️ Deprecrated in favor of https://github.com/piquette/finance-go

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Go Finance

Awesome Quant
A curated list of insanely awesome libraries, packages and resources for Quants (Quantitative Finance)
Stars: ✭ 8,205 (+1430.78%)
Mutual labels:  finance, quantitative-finance, financial-data
Quantdom
Python-based framework for backtesting trading strategies & analyzing financial markets [GUI ]
Stars: ✭ 449 (-16.23%)
Mutual labels:  finance, quantitative-finance, fintech
fhub
Python client for Finnhub API
Stars: ✭ 31 (-94.22%)
Mutual labels:  finance, quantitative-finance, financial-data
Qlib
Qlib is an AI-oriented quantitative investment platform, which aims to realize the potential, empower the research, and create the value of AI technologies in quantitative investment. With Qlib, you can easily try your ideas to create better Quant investment strategies. An increasing number of SOTA Quant research works/papers are released in Qlib.
Stars: ✭ 7,582 (+1314.55%)
Mutual labels:  finance, quantitative-finance, fintech
okama
Investment portfolio and stocks analyzing tools for Python with free historical data
Stars: ✭ 87 (-83.77%)
Mutual labels:  finance, quantitative-finance, financial-data
Qlnet
QLNet C# Library
Stars: ✭ 252 (-52.99%)
Mutual labels:  finance, quantitative-finance
Machine Learning And Ai In Trading
Applying Machine Learning and AI Algorithms applied to Trading for better performance and low Std.
Stars: ✭ 258 (-51.87%)
Mutual labels:  finance, quantitative-finance
Tai
A composable, real time, market data and trade execution toolkit. Built with Elixir, runs on the Erlang virtual machine
Stars: ✭ 264 (-50.75%)
Mutual labels:  quantitative-finance, fintech
Flutter Candlesticks
Elegant OHLC Candlestick and Trade Volume charts for @Flutter
Stars: ✭ 318 (-40.67%)
Mutual labels:  finance, financial-data
turingquant
No description or website provided.
Stars: ✭ 19 (-96.46%)
Mutual labels:  finance, quantitative-finance
Riskfolio Lib
Portfolio Optimization and Quantitative Strategic Asset Allocation in Python
Stars: ✭ 305 (-43.1%)
Mutual labels:  finance, quantitative-finance
Introneuralnetworks
Introducing neural networks to predict stock prices
Stars: ✭ 486 (-9.33%)
Mutual labels:  finance, quantitative-finance
Jqdatasdk
简单易用的量化金融数据包(easy utility for getting financial market data of China)
Stars: ✭ 457 (-14.74%)
Mutual labels:  fintech, financial-data
StockNotify
Easy to deploy stock trigger bot built using python and mongoDB
Stars: ✭ 15 (-97.2%)
Mutual labels:  finance, fintech
trading-rules-using-machine-learning
A financial trading method using machine learning.
Stars: ✭ 16 (-97.01%)
Mutual labels:  finance, quantitative-finance
Alpha vantage
A python wrapper for Alpha Vantage API for financial data.
Stars: ✭ 3,553 (+562.87%)
Mutual labels:  finance, financial-data
Finance Go
📊 Financial markets data library implemented in go.
Stars: ✭ 392 (-26.87%)
Mutual labels:  finance, financial-data
Deep Finance
Datasets, papers and books on AI & Finance.
Stars: ✭ 475 (-11.38%)
Mutual labels:  finance, fintech
Akaunting
Free and Online Accounting Software
Stars: ✭ 4,599 (+758.02%)
Mutual labels:  finance, fintech
FinRL
FinRL: The first open-source project for financial reinforcement learning. Please star. 🔥
Stars: ✭ 3,497 (+552.43%)
Mutual labels:  finance, fintech

go-finance

GoDoc Build Status codecov.io Go Report Card License MIT

codecov.io

go-finance is a Go library for retrieving financial data for quantitative analysis.

Deprecation Warning!

This library will no longer be maintained due to several breaking yahoo finance api changes (surprise). The next gen iteration of this library that uses the newer apis (as well as a few other api integrations) will exist here - https://github.com/piquette/finance-go and is currently in early stages of development. Have an idea or want to get involved? @ me on twitter, @michael_ack. In the meantime, browse some memes - https://reddit.com/r/memes

---Deprecated---

To install go-finance, use the following command:

go get github.com/FlashBoys/go-finance

Features

Single security quotes

package main

import (
	"fmt"

	"github.com/FlashBoys/go-finance"
)

func main() {
	// 15-min delayed full quote for Apple.
	q, err := finance.GetQuote("AAPL")
	if err == nil {
		fmt.Println(q)
	}
}

Multiple securities quotes

package main

import (
	"fmt"

	"github.com/FlashBoys/go-finance"
)

func main() {
	// 15-min delayed full quotes for Apple, Twitter, and Facebook.
	symbols := []string{"AAPL", "TWTR", "FB"}
	quotes, err := finance.GetQuotes(symbols)
	if err == nil {
		fmt.Println(quotes)
	}
}

Currency pair quote

package main

import (
	"fmt"

	"github.com/FlashBoys/go-finance"
)

func main() {
	// Predefined pair constants
	// e.g
	//
	// USDJPY
	// EURUSD
	// NZDUSD
	//
	pairquote, err := finance.GetCurrencyPairQuote(finance.USDJPY)
	if err == nil {
		fmt.Println(pairquote)
	}
}

Quote history

package main

import (
	"fmt"

	"github.com/FlashBoys/go-finance"
)

func main() {
	// Set time frame to 1 month starting Jan. 1.
	start := finance.ParseDatetime("1/1/2017")
	end := finance.ParseDatetime("2/1/2017")

	// Request daily history for TWTR.
	// IntervalDaily OR IntervalWeekly OR IntervalMonthly are supported.
	bars, err := finance.GetHistory("TWTR", start, end, finance.Day)
	if err == nil {
		fmt.Println(bars)
	}
}

Dividend/Split event history

package main

import (
	"fmt"
	"time"

	"github.com/FlashBoys/go-finance"
)

func main() {
	// Set time range from Jan 2010 up to the current date.
	// This example will return a slice of either dividends or splits.
	start := finance.ParseDatetime("1/1/2010")
	end := finance.NewDatetime(time.Now())

	// Request event history for AAPL.
	events, err := finance.GetEventHistory("AAPL", start, end, finance.Dividends)
	if err == nil {
		fmt.Println(events)
	}
}

Symbols download

package main

import (
	"fmt"

	"github.com/FlashBoys/go-finance"
)

func main() {
	// Request all BATS symbols.
	symbols, err := finance.GetUSEquitySymbols()
	if err == nil {
		fmt.Println(symbols)
	}
}

Options chains

package main

import (
	"fmt"

	"github.com/FlashBoys/go-finance"
)

func main() {
	// Fetches the available expiration dates.
	c, err := finance.NewCycle("AAPL")
	if err != nil {
		panic(err)
	}

	// Some examples - see docs for full details.

	// Fetches the chain for the front month.
	calls, puts, err := c.GetFrontMonth()
	if err == nil {
		panic(err)
	}
	fmt.Println(calls)
	fmt.Println(puts)

	// Fetches the chain for the specified expiration date.
	calls, puts, err := c.GetChainForExpiration(chain.Expirations[1])
	if err == nil {
		panic(err)
	}
	fmt.Println(calls)
	fmt.Println(puts)

	// Fetches calls for the specified expiration date.
	calls, err := c.GetCallsForExpiration(chain.Expirations[1])
	if err == nil {
		panic(err)
	}
	fmt.Println(calls)
}

Intentions

The primary technical tenants of this project are:

  • Make financial data easy and fun to work with in Go.
  • Abstract the burden of non-sexy model serialization away from the end-user.
  • Provide a mature framework where the end-user needs only be concerned with analysis instead of data sourcing.

There are several applications for this library. It's intentions are to be conducive to the following activities:

  • Quantitative financial analysis in Go.
  • Academic study/comparison in a clean, easy language.
  • Algorithmic/Statistical-based strategy implementation.

API Changes

Yahoo decided to deprecate the ichart API for historical data. A few things to note:

  • Dividends and Splits got separated into their own calls, use finance.Dividends or finance.Splits.
  • A cookie and a crumb are now needed in the new historical API. This requires 2 calls, slowing down the response time/quality.
  • Continuation of the historical data funcs were made possible by the solution proposed by pandas contributors here, so thanks for the help!
    • That PR is also reporting a degradation of data quality in the responses, so watch out for that.

You can use the new health checking command to determine if all the endpoints are responding appropriately. Run go run main.go in the cmd/health directory and report any failures!

Contributing

If you find this repo helpful, please give it a star! If you wish to discuss changes to it, please open an issue. This project is not as mature as it could be, and financial projects in Go are in drastic need of some basic helpful dependencies.

Similar Projects

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].