valuation

package
v2.1.29 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2026 License: AGPL-3.0 Imports: 1 Imported by: 0

README

valuation

import "github.com/cinar/indicator/v2/valuation"

Index

func Fv

func Fv(pv, rate float64, years int) float64

Fv calculates the Future Value (FV) of a Present Value (PV).

Formula: FV = PV * (1 + rate)^years

func Npv

func Npv(rate float64, cfs []float64) float64

Npv calculates the Net Present Value (NPV) of a series of cash flows.

Formula: NPV = sum(CF_i / (1 + rate)^i) for i = 1 to n

func Pv

func Pv(fv, rate float64, years int) float64

Pv calculates the Present Value (PV) of a Future Value (FV).

Formula: PV = FV / (1 + rate)^years

Generated by gomarkdoc

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fv

func Fv(pv, rate float64, years int) float64

Fv calculates the Future Value (FV) of a Present Value (PV).

Formula: FV = PV * (1 + rate)^years

func Npv

func Npv(rate float64, cfs []float64) float64

Npv calculates the Net Present Value (NPV) of a series of cash flows.

Formula: NPV = sum(CF_i / (1 + rate)^i) for i = 1 to n

func Pv

func Pv(fv, rate float64, years int) float64

Pv calculates the Present Value (PV) of a Future Value (FV).

Formula: PV = FV / (1 + rate)^years

Types

This section is empty.

Jump to

Keyboard shortcuts

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