Time Value of Money, Time Series Analysis and Computational Finance

Package for time value of money calculation, time series analysis and computational finance.

Open Source Love GPL Licence stable Created on Fri Jul 19 2013
Updated on Mon May 12 15:57:11 2014

FinCal -- Time Value of Money, time series analysis and Computational Finance

FinCal is available on CRAN and GitHub

install.packages("FinCal",dependencies=TRUE) # from CRAN


install_github("felixfan/FinCal") # from GitHub

Functions available:

 [1] "bdy"                   "bdy2mmy"              
 [3] "candlestickChart"      "cash.ratio"           
 [5] "coefficient.variation" "cogs"                 
 [7] "current.ratio"         "ddb"                  
 [9] "debt.ratio"            "diluted.EPS"          
[11] "discount.rate"         "ear"                  
[13] "ear.continuous"        "ear2bey"              
[15] "ear2hpr"               "EIR"                  
[17] "EPS"                   "financial.leverage"   
[19] "fv"                    "fv.annuity"           
[21] "fv.simple"             "fv.uneven"            
[23] "geometric.mean"        "get.ohlc.google"      
[25] "get.ohlc.yahoo"        "get.ohlcs.google"     
[27] "get.ohlcs.yahoo"       "gpm"                  
[29] "harmonic.mean"         "hpr"                  
[31] "hpr2bey"               "hpr2ear"              
[33] "hpr2mmy"               "irr"                  
[35] "iss"                   "lineChart"            
[37] "lineChartMult"         "lt.d2e"               
[39] "mmy2hpr"               "n.period"             
[41] "npm"                   "npv"                  
[43] "pmt"                   "pv"                   
[45] "pv.annuity"            "pv.perpetuity"        
[47] "pv.simple"             "pv.uneven"            
[49] "quick.ratio"           "r.continuous"         
[51] "r.norminal"            "r.perpetuity"         
[53] "sampling.error"        "SFRatio"              
[55] "Sharpe.ratio"          "slde"                 
[57] "total.d2e"             "twrr"                 
[59] "volumeChart"           "was"                  
[61] "wpr"                  

Getting help on a function (e.g., pv)

help{pv}    # display the documentation for the function
args{pv}    # see arguments of the function
example{pv} # see example of using the function
  • Examples for version 0.1 -0.6

  • Yanhui Fan. (2016) FinCal: package for time value of money calculation, time series analysis and computational finance. Zenodo. DOI


FinCal 0.6.3

can calculate negative irr now

FinCal 0.6.2

change import to importFrom

FinCal 0.6.1

optimize functions: discount.rate and irr ("uniroot" function was used, run fast now) optimize functions: lineChart, lineChartMult, volumeChart, candlestickChart (parameter "breaks" was added to control the width between breaks, "date.breaks" function was deleted)

FinCal 0.6

Released 2014-Feb-02

Equivalent/proportional Interest Rates

  • add EIR

FinCal 0.5

Released 2013-Sept-25

Depreciation Expense Recognition Methods

  • add slde
  • add ddb

Earnings Per Share (EPS) Methods

  • add EPS
  • add diluted.EPS
  • add was
  • add iss

Evaluate a company's financial performance

  • add gpm
  • add npm

Liquidity ratios measure the firm's ability to satisfy its short-term obligations as they come due.

  • add current.ratio
  • add cash.ratio
  • add quick.ratio

Solvency ratios measure the firm's ability to satisfy its long-term obligations.

  • add lt.d2e
  • add total.d2e
  • add debt.ratio
  • add financial.leverage

FinCal 0.4

Released 2013-Sept-04

revised @examples, so multiple examples for some functions call be displayed

Cost of goods sold and ending inventory under three methods (FIFO,LIFO,Weighted average)

  • add cogs

FinCal 0.3

Released 2013-Aug-13

Methods for downloading historical stock prices from Yahoo finance and Google finance, technical analysis.


  • add wpr,
  • add geometric.mean
  • add harmonic.mean
  • add SFRatio
  • add Sharpe.ratio
  • add coefficient.variation
  • add sampling.error
  • add get.ohlc.yahoo
  • add get.ohlc.google
  • add get.ohlcs.yahoo
  • add get.ohlcs.google
  • add date.breaks
  • add lineChart
  • add lineChartMult
  • add volumeChart
  • add candlestickChart

FinCal 0.2

Released 2013-Aug-01

Revised function manual to roxygen2 format.


  • add r.perpetuity
  • add discount.rate
  • add npv
  • add irr
  • add hpr
  • add twrr
  • add hpr2ear
  • add hpr2mmy
  • add bdy
  • add bdy2mmy
  • add mmy2hpr
  • add ear2hpr
  • add hpr2bey
  • add ear2bey

FinCal 0.1

Released 2013-July-16

First official release of the FinCal R package. Financial calculator for time value money. Tools for computational finance.


  • pv.simple
  • fv.simple
  • pv.annuity
  • fv.annuity
  • pv.perpetuity
  • pv
  • fv
  • fv.uneven
  • pv.uneven
  • pmt
  • n.period
  • r.continuous
  • r.norminal
  • ear
  • ear.continuous

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.6.3 by Felix Yanhui Fan, 5 years ago


Browse source code at https://github.com/cran/FinCal

Authors: Felix Yanhui Fan <[email protected]>

Documentation:   PDF Manual  

GPL (>= 2) license

Imports ggplot2, reshape2, RCurl

Imported by forestmangr.

Suggested by raw.

See at CRAN