MIT License

项目介绍

markcheno/go-talib 是一个托管在 GitHub 上的开源项目,主要使用 Go 编写,采用 MIT License 许可证,目前获得 943 个 Star、229 次 Fork。

仓库全名
markcheno/go-talib
开源许可证
MIT License
Star 数
943
Fork 数
229
未关闭 Issue
5

README 摘要

go-talib A pure Go port of TA-Lib Install Install the package with: Import it with: and use talib as the package name inside the code. Example Every indicator takes one or more []float64 price series (plus parameters) and returns a []float64 (or a tuple of them) the same length as the input. The leading "lookback" region that cannot be computed is zero-filled. Inputs that are too short for the requested period, or…

完整内容见 GitHub 原始 README 或本页 。

常见问题

go-talib 用什么语言开发?

主要使用 Go 编写,采用 MIT License 许可证,目前有 943 个 Star。

go-talib 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 go-talib 的源码?

可以直接克隆仓库:git clone https://github.com/markcheno/go-talib.git,默认分支为 master;安装与运行步骤见仓库 README。

go-talib 最近还在维护吗?

仓库最近一次更新为 6月17日,当前有 5 个未关闭 Issue;Star 数为 943,可作为社区活跃度的参考。

简要分析

热度分
1437
价值分
637
活跃状态
活跃

语言占比

Go
Just

README

go-talib

GoDoc

A pure Go port of TA-Lib

Install

Install the package with:

go get github.com/markcheno/go-talib

Import it with:

import "github.com/markcheno/go-talib"

and use talib as the package name inside the code.

Example

package main

import (
	"fmt"
	"github.com/markcheno/go-quote"
	"github.com/markcheno/go-talib"
)

func main() {
	spy, _ := quote.NewQuoteFromTiingo("spy", "2016-01-01", "2016-04-01", quote.Daily, true)
	fmt.Print(spy.CSV())
	rsi2 := talib.Rsi(spy.Close, 2)
	fmt.Println(rsi2)
}

Every indicator takes one or more []float64 price series (plus parameters) and returns a []float64 (or a tuple of them) the same length as the input. The leading “lookback” region that cannot be computed is zero-filled.

Inputs that are too short for the requested period, or an invalid (non-positive) period, return a zero-filled slice of the correct length rather than panicking.

Development

Tests compare every indicator against the reference Python TA-Lib, so they need a python with numpy and TA-Lib available. A justfile provisions that interpreter with uv automatically:

just test              # set up the venv (first run) and run the full suite
just test-one TestRsi  # run a single test or pattern
just bench MidP        # run benchmarks

just setup creates a project-local .venv (via uv) with numpy + TA-Lib; the other recipes put it on PATH so the test harness’s python resolves to it. Run just with no arguments to list all recipes.

License

MIT License - see LICENSE for more details

Contributors

评论

暂无评论