Class: FinModeling::CAPM::RiskFreeRate

Inherits:
Object
  • Object
show all
Defined in:
lib/finmodeling/capm.rb

Overview

FIXME: this is totally arbitrary. Find a better way to represent the fact that this is a probability distribution

Class Method Summary collapse

Class Method Details

.forward_estimate(risk_free_symbol = "^TNX") ⇒ Object

Possible symbols: “^TNX” -> CBOEInterestRate10-YearT-Note (Good for long-term, future-oriented decisions) ? -> 90-day t-bill (Good for historical short-period R_f estimation)



20
21
22
23
# File 'lib/finmodeling/capm.rb', line 20

def self.forward_estimate(risk_free_symbol="^TNX")
  quotes = YahooFinance::get_HistoricalQuotes_days(URI::encode(risk_free_symbol), num_days=1)
  FinModeling::Rate.new(quotes.last.adjClose / 100.0)
end