Class: RMarket::Beliefs::NewsGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/rmarket/beliefs/news.rb

Overview

noise in news perturbs the next period dividend shock

Instance Method Summary collapse

Constructor Details

#initialize(noise_distribution) ⇒ NewsGenerator

Returns a new instance of NewsGenerator.



19
20
21
# File 'lib/rmarket/beliefs/news.rb', line 19

def initialize(noise_distribution)
  @noise_distribution = noise_distribution
end

Instance Method Details

#generate_news(next_shock, last_dividend) ⇒ Object



23
24
25
# File 'lib/rmarket/beliefs/news.rb', line 23

def generate_news(next_shock, last_dividend)
  News.new(@noise_distribution.sample+next_shock, last_dividend)
end

#noise_meanObject



16
# File 'lib/rmarket/beliefs/news.rb', line 16

def noise_mean; @noise_distribution.mu; end

#noise_stdObject



17
# File 'lib/rmarket/beliefs/news.rb', line 17

def noise_std; @noise_distribution.sigma; end