package
0.0.0-20210616135503-108e95a44fa8
Repository: https://github.com/agux/pachon.git
Documentation: pkg.go.dev
# Functions
AppendVarateRgl supplements varate_rgl field in relevant kline tables.
CalcIndics calculates various indicators for given stocks.
CalcKdjDevi calculates deviation for Kdj.
CalLogReturns calculates log return for high, open, close, low, and volume variation rates, or regulated variation rates if available.
CalLogReturnsV2 calculates log return for high, open, close, low, volume, and variation rates, or regulated variation rates if available.
CalVarate calculates variation rate based on previous value and current value.
Cleanup cleans up any resources allocated for the program, including processes running outside of this one.
CollectFsStats updates feature scaling stats.
FixVarate fixes stock varate inaccurate issue caused by 0 close price introduced in reinstate process.
FreeFetcherResources after usage.
Get miscellaneous stock info.
GetAllKdjFeatDat gets all kdj feature data from db.
GetFinance get finance info from server.
GetFinPrediction get financial performance prediction.
GetIdxLst loads index data from database.
GetIndexList fetches index list from configured source.
GetIndices fetches index data from configured source.
GetIndicesV2 fetches index data from configured source.
GetKdjFeatDat gets Kdj feature data from db.
GetKdjFeatDatRaw get kdj raw feature data from cache, or database if not found.
GetKdjHist Find kdj history up to 'toDate', limited to 'retro' rows.
GetKlBtwn fetches kline data between dates.
GetKlBtwnKlid fetches kline data between specified klids.
GetKlineDb get specified type of kline data from database.
GetKlines Get various types of kline data for the given stocks.
GetKlinesV2 Get various types of kline data for the given stocks.
GetStockInfo fetches basic stocks info from remote servers.
GetTrDataAt fetches trading data at specified dates/klids.
GetTrDataBtwn fetches trading data between dates/klids.
GetTrDataDB get specified type of kline data from database.
GetV2 gets miscellaneous stock info.
GetXDXRs fetches XDXR info from the web.
KlinePostProcess manipulates data stored in databaseafter all newly data are fetched from remote source.
MergeXdxrBetween merges financial values of xdxr events between specified start date(excluding) and end date(including).
ParseIfengBonus parses stock bonus info from Ifeng.
PruneKdjFeatDat Merge similar kdj feature data based on devia.
Reinstate adjusts price considering given XDXR data.
SmpKdjFeat sample kdj features.
StocksDb loads all stocks from basics table.
StocksDbByCode load stocks of specified codes from the basics table.
StocksDbTo load all stock data from basics into specified interface{}.
StopWatch stops the timer and insert duration info into stats table.
ToLstJDCross extract elements starting from the latest J and D cross or minimum element.
ToOne merges qs into one quote, such as merging daily quotes into weekly quote or month quote.
UpdateStockRels updates stock relationship data in db.
UpdateValidateKlineParams syncs params from configuration file to database.
XdxrDateBetween sums xdxr data according to xdxr_date, returning a map of xdxr_date and its accumulated divi, shares_allot, and shares_cvt, excluding other fields.
# Constants
Date the date for a specific trade data record.
HistDataSize history data size.
JobCapacity reference.
KdjFdPrunePrec the precision for KDJ feature data pruning.
KdjPruneRate the rate for KDJ pruning.
Klid the kline ID for the specific trade data record.
LocalPruneThreshold the threshold for local prune.
# Structs
EmKlineFetcher is capable of fetching kline data from eastmoney.
FetchRequest specifies the arguments to fetch data from remote sources.
SinaKlineFetcher fetches kline from sina.
TrDataQry trading data query parameters.
XqKlineFetcher is capable of fetching kline data from Xueqiu.
# Type aliases
TradeDataField stands for the common table columns related to trade data.