Class: StockPriceImitation::Generator
- Inherits:
-
Object
- Object
- StockPriceImitation::Generator
- Defined in:
- lib/stock_price_imitation/generator.rb
Defined Under Namespace
Classes: Step
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(step_count, first_seed_price = 1000) ⇒ Generator
constructor
A new instance of Generator.
Constructor Details
#initialize(step_count, first_seed_price = 1000) ⇒ Generator
Returns a new instance of Generator.
4 5 6 7 8 9 10 |
# File 'lib/stock_price_imitation/generator.rb', line 4 def initialize(step_count, first_seed_price=1000) @step_count = step_count @first_seed_price = first_seed_price @bell = RandomBell.new(mu: 0.0, range: 0.0..2.0) @steps = [] end |
Instance Method Details
#execute ⇒ Object
12 13 14 |
# File 'lib/stock_price_imitation/generator.rb', line 12 def execute prices_by(seed_prices) end |