financials

package
v0.0.0-...-d9eb902 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateInterestPaidSchedule

func CalculateInterestPaidSchedule(principal, monthlyPayment, interestRatePercentage float64) []float64

Public only because used in test

func CalculateMortgageMonthlyPayment

func CalculateMortgageMonthlyPayment(principal, interestRate float64, duration int) float64

Public only because used in test

Types

type Alphavantage

type Alphavantage interface {
	GetSymbolFromAlphavantage(symbol string) (*AlphavantageSymbol, error)
	GetCurrencyHistory(from string, to string, isCompact bool) (map[string]OHLC, error)
	GetStockHistory(symbol string, isCompact bool) (map[string]OHLC, error)
}

func NewAlphavantage

func NewAlphavantage(apiKey string) Alphavantage

type AlphavantageSymbol

type AlphavantageSymbol struct {
	Symbol   string `json:"1. symbol"`
	Currency string `json:"8. currency"`
}

type Loader

type Loader interface {
	Load() error
	Name() string
}

func NewAverageExpenditureLoader

func NewAverageExpenditureLoader(fw framework.FW) Loader

func NewCSVLoader

func NewCSVLoader(fw framework.FW) Loader

func NewCarLoader

func NewCarLoader(fw framework.FW) Loader

func NewHouseAssetLoader

func NewHouseAssetLoader(fw framework.FW) Loader

func NewInvestmentsLoader

func NewInvestmentsLoader(fw framework.FW) Loader

func NewMortgageLoader

func NewMortgageLoader(fw framework.FW) Loader

func NewSharedExpenseLoader

func NewSharedExpenseLoader(fw framework.FW) Loader

func NewStocksLoader

func NewStocksLoader(fw framework.FW, alphavantage Alphavantage) Loader

func NewTransactionLoader

func NewTransactionLoader(fw framework.FW) Loader

type OHLC

type OHLC struct {
	Open  float64
	High  float64
	Low   float64
	Close float64
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL