option_lab 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. checksums.yaml +7 -0
  2. data/.rspec +3 -0
  3. data/.rubocop.yml +139 -0
  4. data/.yard/hooks/before_generate.rb +7 -0
  5. data/.yardopts +11 -0
  6. data/Gemfile +26 -0
  7. data/LICENSE.txt +21 -0
  8. data/README.md +180 -0
  9. data/Rakefile +44 -0
  10. data/docs/OptionLab/BinomialTree.html +1271 -0
  11. data/docs/OptionLab/BjerksundStensland.html +2022 -0
  12. data/docs/OptionLab/BlackScholes.html +2388 -0
  13. data/docs/OptionLab/Engine.html +1716 -0
  14. data/docs/OptionLab/Models/AmericanModelInputs.html +937 -0
  15. data/docs/OptionLab/Models/ArrayInputs.html +463 -0
  16. data/docs/OptionLab/Models/BaseModel.html +223 -0
  17. data/docs/OptionLab/Models/BinomialModelInputs.html +1161 -0
  18. data/docs/OptionLab/Models/BlackScholesInfo.html +967 -0
  19. data/docs/OptionLab/Models/BlackScholesModelInputs.html +851 -0
  20. data/docs/OptionLab/Models/ClosedPosition.html +445 -0
  21. data/docs/OptionLab/Models/EngineData.html +2523 -0
  22. data/docs/OptionLab/Models/EngineDataResults.html +435 -0
  23. data/docs/OptionLab/Models/Inputs.html +2241 -0
  24. data/docs/OptionLab/Models/LaplaceInputs.html +777 -0
  25. data/docs/OptionLab/Models/Option.html +736 -0
  26. data/docs/OptionLab/Models/Outputs.html +1753 -0
  27. data/docs/OptionLab/Models/PoPOutputs.html +645 -0
  28. data/docs/OptionLab/Models/PricingResult.html +848 -0
  29. data/docs/OptionLab/Models/Stock.html +583 -0
  30. data/docs/OptionLab/Models/TreeVisualization.html +688 -0
  31. data/docs/OptionLab/Models.html +251 -0
  32. data/docs/OptionLab/Plotting.html +548 -0
  33. data/docs/OptionLab/Support.html +2884 -0
  34. data/docs/OptionLab/Utils.html +619 -0
  35. data/docs/OptionLab.html +133 -0
  36. data/docs/_index.html +376 -0
  37. data/docs/class_list.html +54 -0
  38. data/docs/css/common.css +1 -0
  39. data/docs/css/full_list.css +58 -0
  40. data/docs/css/style.css +503 -0
  41. data/docs/file.LICENSE.html +70 -0
  42. data/docs/file.README.html +263 -0
  43. data/docs/file_list.html +64 -0
  44. data/docs/frames.html +22 -0
  45. data/docs/index.html +263 -0
  46. data/docs/js/app.js +344 -0
  47. data/docs/js/full_list.js +242 -0
  48. data/docs/js/jquery.js +4 -0
  49. data/docs/method_list.html +1974 -0
  50. data/docs/top-level-namespace.html +110 -0
  51. data/examples/american_options.rb +163 -0
  52. data/examples/covered_call.rb +76 -0
  53. data/lib/option_lab/binomial_tree.rb +238 -0
  54. data/lib/option_lab/bjerksund_stensland.rb +276 -0
  55. data/lib/option_lab/black_scholes.rb +323 -0
  56. data/lib/option_lab/engine.rb +492 -0
  57. data/lib/option_lab/models.rb +768 -0
  58. data/lib/option_lab/plotting.rb +182 -0
  59. data/lib/option_lab/support.rb +471 -0
  60. data/lib/option_lab/utils.rb +107 -0
  61. data/lib/option_lab/version.rb +5 -0
  62. data/lib/option_lab.rb +134 -0
  63. data/option_lab.gemspec +43 -0
  64. metadata +207 -0
@@ -0,0 +1,777 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: OptionLab::Models::LaplaceInputs
8
+
9
+ &mdash; OptionLab Documentation
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "OptionLab::Models::LaplaceInputs";
19
+ relpath = '../../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../../_index.html">Index (L)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../../OptionLab.html" title="OptionLab (module)">OptionLab</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Models.html" title="OptionLab::Models (module)">Models</a></span></span>
41
+ &raquo;
42
+ <span class="title">LaplaceInputs</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: OptionLab::Models::LaplaceInputs
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName"><span class='object_link'><a href="BaseModel.html" title="OptionLab::Models::BaseModel (class)">BaseModel</a></span></span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next"><span class='object_link'><a href="BaseModel.html" title="OptionLab::Models::BaseModel (class)">BaseModel</a></span></li>
78
+
79
+ <li class="next">OptionLab::Models::LaplaceInputs</li>
80
+
81
+ </ul>
82
+ <a href="#" class="inheritanceTree">show all</a>
83
+
84
+ </dd>
85
+ </dl>
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+ <dl>
98
+ <dt>Defined in:</dt>
99
+ <dd>lib/option_lab/models.rb</dd>
100
+ </dl>
101
+
102
+ </div>
103
+
104
+ <h2>Overview</h2><div class="docstring">
105
+ <div class="discussion">
106
+ <p>Laplace model inputs</p>
107
+
108
+
109
+ </div>
110
+ </div>
111
+ <div class="tags">
112
+
113
+
114
+ </div>
115
+
116
+
117
+
118
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
119
+ <ul class="summary">
120
+
121
+ <li class="public ">
122
+ <span class="summary_signature">
123
+
124
+ <a href="#model-instance_method" title="#model (instance method)">#<strong>model</strong> &#x21d2; Object </a>
125
+
126
+
127
+
128
+ </span>
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+ <span class="summary_desc"><div class='inline'><p>Returns the value of attribute model.</p>
142
+ </div></span>
143
+
144
+ </li>
145
+
146
+
147
+ <li class="public ">
148
+ <span class="summary_signature">
149
+
150
+ <a href="#mu-instance_method" title="#mu (instance method)">#<strong>mu</strong> &#x21d2; Object </a>
151
+
152
+
153
+
154
+ </span>
155
+
156
+
157
+
158
+
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+ <span class="summary_desc"><div class='inline'><p>Returns the value of attribute mu.</p>
168
+ </div></span>
169
+
170
+ </li>
171
+
172
+
173
+ <li class="public ">
174
+ <span class="summary_signature">
175
+
176
+ <a href="#stock_price-instance_method" title="#stock_price (instance method)">#<strong>stock_price</strong> &#x21d2; Object </a>
177
+
178
+
179
+
180
+ </span>
181
+
182
+
183
+
184
+
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+
193
+ <span class="summary_desc"><div class='inline'><p>Returns the value of attribute stock_price.</p>
194
+ </div></span>
195
+
196
+ </li>
197
+
198
+
199
+ <li class="public ">
200
+ <span class="summary_signature">
201
+
202
+ <a href="#volatility-instance_method" title="#volatility (instance method)">#<strong>volatility</strong> &#x21d2; Object </a>
203
+
204
+
205
+
206
+ </span>
207
+
208
+
209
+
210
+
211
+
212
+
213
+
214
+
215
+
216
+
217
+
218
+
219
+ <span class="summary_desc"><div class='inline'><p>Returns the value of attribute volatility.</p>
220
+ </div></span>
221
+
222
+ </li>
223
+
224
+
225
+ <li class="public ">
226
+ <span class="summary_signature">
227
+
228
+ <a href="#years_to_target_date-instance_method" title="#years_to_target_date (instance method)">#<strong>years_to_target_date</strong> &#x21d2; Object </a>
229
+
230
+
231
+
232
+ </span>
233
+
234
+
235
+
236
+
237
+
238
+
239
+
240
+
241
+
242
+
243
+
244
+
245
+ <span class="summary_desc"><div class='inline'><p>Returns the value of attribute years_to_target_date.</p>
246
+ </div></span>
247
+
248
+ </li>
249
+
250
+
251
+ </ul>
252
+
253
+
254
+
255
+
256
+
257
+ <h2>
258
+ Instance Method Summary
259
+ <small><a href="#" class="summary_toggle">collapse</a></small>
260
+ </h2>
261
+
262
+ <ul class="summary">
263
+
264
+ <li class="public ">
265
+ <span class="summary_signature">
266
+
267
+ <a href="#==-instance_method" title="#== (instance method)">#<strong>==</strong>(other) &#x21d2; Object </a>
268
+
269
+
270
+
271
+ (also: #eql?)
272
+
273
+ </span>
274
+
275
+
276
+
277
+
278
+
279
+
280
+
281
+
282
+
283
+ <span class="summary_desc"><div class='inline'></div></span>
284
+
285
+ </li>
286
+
287
+
288
+ <li class="public ">
289
+ <span class="summary_signature">
290
+
291
+ <a href="#hash-instance_method" title="#hash (instance method)">#<strong>hash</strong> &#x21d2; Object </a>
292
+
293
+
294
+
295
+ </span>
296
+
297
+
298
+
299
+
300
+
301
+
302
+
303
+
304
+
305
+ <span class="summary_desc"><div class='inline'></div></span>
306
+
307
+ </li>
308
+
309
+
310
+ <li class="public ">
311
+ <span class="summary_signature">
312
+
313
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(attributes = {}) &#x21d2; LaplaceInputs </a>
314
+
315
+
316
+
317
+ </span>
318
+
319
+
320
+ <span class="note title constructor">constructor</span>
321
+
322
+
323
+
324
+
325
+
326
+
327
+
328
+
329
+ <span class="summary_desc"><div class='inline'><p>A new instance of LaplaceInputs.</p>
330
+ </div></span>
331
+
332
+ </li>
333
+
334
+
335
+ <li class="public ">
336
+ <span class="summary_signature">
337
+
338
+ <a href="#validate!-instance_method" title="#validate! (instance method)">#<strong>validate!</strong> &#x21d2; Object </a>
339
+
340
+
341
+
342
+ </span>
343
+
344
+
345
+
346
+
347
+
348
+
349
+
350
+
351
+
352
+ <span class="summary_desc"><div class='inline'></div></span>
353
+
354
+ </li>
355
+
356
+
357
+ </ul>
358
+
359
+
360
+
361
+
362
+ <div id="constructor_details" class="method_details_list">
363
+ <h2>Constructor Details</h2>
364
+
365
+ <div class="method_details first">
366
+ <h3 class="signature first" id="initialize-instance_method">
367
+
368
+ #<strong>initialize</strong>(attributes = {}) &#x21d2; <tt><span class='object_link'><a href="" title="OptionLab::Models::LaplaceInputs (class)">LaplaceInputs</a></span></tt>
369
+
370
+
371
+
372
+
373
+
374
+ </h3><div class="docstring">
375
+ <div class="discussion">
376
+ <p>Returns a new instance of LaplaceInputs.</p>
377
+
378
+
379
+ </div>
380
+ </div>
381
+ <div class="tags">
382
+
383
+
384
+ </div><table class="source_code">
385
+ <tr>
386
+ <td>
387
+ <pre class="lines">
388
+
389
+
390
+ 474
391
+ 475
392
+ 476
393
+ 477
394
+ 478
395
+ 479
396
+ 480
397
+ 481</pre>
398
+ </td>
399
+ <td>
400
+ <pre class="code"><span class="info file"># File 'lib/option_lab/models.rb', line 474</span>
401
+
402
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_attributes'>attributes</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
403
+ <span class='comment'># Set defaults
404
+ </span> <span class='ivar'>@model</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>laplace</span><span class='tstring_end'>&#39;</span></span>
405
+
406
+ <span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_attributes'>attributes</span><span class='rparen'>)</span>
407
+
408
+ <span class='id identifier rubyid_validate!'>validate!</span>
409
+ <span class='kw'>end</span></pre>
410
+ </td>
411
+ </tr>
412
+ </table>
413
+ </div>
414
+
415
+ </div>
416
+
417
+ <div id="instance_attr_details" class="attr_details">
418
+ <h2>Instance Attribute Details</h2>
419
+
420
+
421
+ <span id="model=-instance_method"></span>
422
+ <div class="method_details first">
423
+ <h3 class="signature first" id="model-instance_method">
424
+
425
+ #<strong>model</strong> &#x21d2; <tt>Object</tt>
426
+
427
+
428
+
429
+
430
+
431
+ </h3><div class="docstring">
432
+ <div class="discussion">
433
+ <p>Returns the value of attribute model.</p>
434
+
435
+
436
+ </div>
437
+ </div>
438
+ <div class="tags">
439
+
440
+
441
+ </div><table class="source_code">
442
+ <tr>
443
+ <td>
444
+ <pre class="lines">
445
+
446
+
447
+ 472
448
+ 473
449
+ 474</pre>
450
+ </td>
451
+ <td>
452
+ <pre class="code"><span class="info file"># File 'lib/option_lab/models.rb', line 472</span>
453
+
454
+ <span class='kw'>def</span> <span class='id identifier rubyid_model'>model</span>
455
+ <span class='ivar'>@model</span>
456
+ <span class='kw'>end</span></pre>
457
+ </td>
458
+ </tr>
459
+ </table>
460
+ </div>
461
+
462
+
463
+ <span id="mu=-instance_method"></span>
464
+ <div class="method_details ">
465
+ <h3 class="signature " id="mu-instance_method">
466
+
467
+ #<strong>mu</strong> &#x21d2; <tt>Object</tt>
468
+
469
+
470
+
471
+
472
+
473
+ </h3><div class="docstring">
474
+ <div class="discussion">
475
+ <p>Returns the value of attribute mu.</p>
476
+
477
+
478
+ </div>
479
+ </div>
480
+ <div class="tags">
481
+
482
+
483
+ </div><table class="source_code">
484
+ <tr>
485
+ <td>
486
+ <pre class="lines">
487
+
488
+
489
+ 472
490
+ 473
491
+ 474</pre>
492
+ </td>
493
+ <td>
494
+ <pre class="code"><span class="info file"># File 'lib/option_lab/models.rb', line 472</span>
495
+
496
+ <span class='kw'>def</span> <span class='id identifier rubyid_mu'>mu</span>
497
+ <span class='ivar'>@mu</span>
498
+ <span class='kw'>end</span></pre>
499
+ </td>
500
+ </tr>
501
+ </table>
502
+ </div>
503
+
504
+
505
+ <span id="stock_price=-instance_method"></span>
506
+ <div class="method_details ">
507
+ <h3 class="signature " id="stock_price-instance_method">
508
+
509
+ #<strong>stock_price</strong> &#x21d2; <tt>Object</tt>
510
+
511
+
512
+
513
+
514
+
515
+ </h3><div class="docstring">
516
+ <div class="discussion">
517
+ <p>Returns the value of attribute stock_price.</p>
518
+
519
+
520
+ </div>
521
+ </div>
522
+ <div class="tags">
523
+
524
+
525
+ </div><table class="source_code">
526
+ <tr>
527
+ <td>
528
+ <pre class="lines">
529
+
530
+
531
+ 472
532
+ 473
533
+ 474</pre>
534
+ </td>
535
+ <td>
536
+ <pre class="code"><span class="info file"># File 'lib/option_lab/models.rb', line 472</span>
537
+
538
+ <span class='kw'>def</span> <span class='id identifier rubyid_stock_price'>stock_price</span>
539
+ <span class='ivar'>@stock_price</span>
540
+ <span class='kw'>end</span></pre>
541
+ </td>
542
+ </tr>
543
+ </table>
544
+ </div>
545
+
546
+
547
+ <span id="volatility=-instance_method"></span>
548
+ <div class="method_details ">
549
+ <h3 class="signature " id="volatility-instance_method">
550
+
551
+ #<strong>volatility</strong> &#x21d2; <tt>Object</tt>
552
+
553
+
554
+
555
+
556
+
557
+ </h3><div class="docstring">
558
+ <div class="discussion">
559
+ <p>Returns the value of attribute volatility.</p>
560
+
561
+
562
+ </div>
563
+ </div>
564
+ <div class="tags">
565
+
566
+
567
+ </div><table class="source_code">
568
+ <tr>
569
+ <td>
570
+ <pre class="lines">
571
+
572
+
573
+ 472
574
+ 473
575
+ 474</pre>
576
+ </td>
577
+ <td>
578
+ <pre class="code"><span class="info file"># File 'lib/option_lab/models.rb', line 472</span>
579
+
580
+ <span class='kw'>def</span> <span class='id identifier rubyid_volatility'>volatility</span>
581
+ <span class='ivar'>@volatility</span>
582
+ <span class='kw'>end</span></pre>
583
+ </td>
584
+ </tr>
585
+ </table>
586
+ </div>
587
+
588
+
589
+ <span id="years_to_target_date=-instance_method"></span>
590
+ <div class="method_details ">
591
+ <h3 class="signature " id="years_to_target_date-instance_method">
592
+
593
+ #<strong>years_to_target_date</strong> &#x21d2; <tt>Object</tt>
594
+
595
+
596
+
597
+
598
+
599
+ </h3><div class="docstring">
600
+ <div class="discussion">
601
+ <p>Returns the value of attribute years_to_target_date.</p>
602
+
603
+
604
+ </div>
605
+ </div>
606
+ <div class="tags">
607
+
608
+
609
+ </div><table class="source_code">
610
+ <tr>
611
+ <td>
612
+ <pre class="lines">
613
+
614
+
615
+ 472
616
+ 473
617
+ 474</pre>
618
+ </td>
619
+ <td>
620
+ <pre class="code"><span class="info file"># File 'lib/option_lab/models.rb', line 472</span>
621
+
622
+ <span class='kw'>def</span> <span class='id identifier rubyid_years_to_target_date'>years_to_target_date</span>
623
+ <span class='ivar'>@years_to_target_date</span>
624
+ <span class='kw'>end</span></pre>
625
+ </td>
626
+ </tr>
627
+ </table>
628
+ </div>
629
+
630
+ </div>
631
+
632
+
633
+ <div id="instance_method_details" class="method_details_list">
634
+ <h2>Instance Method Details</h2>
635
+
636
+
637
+ <div class="method_details first">
638
+ <h3 class="signature first" id="==-instance_method">
639
+
640
+ #<strong>==</strong>(other) &#x21d2; <tt>Object</tt>
641
+
642
+
643
+
644
+ <span class="aliases">Also known as:
645
+ <span class="names"><span id='eql?-instance_method'>eql?</span></span>
646
+ </span>
647
+
648
+
649
+
650
+ </h3><table class="source_code">
651
+ <tr>
652
+ <td>
653
+ <pre class="lines">
654
+
655
+
656
+ 487
657
+ 488
658
+ 489
659
+ 490
660
+ 491
661
+ 492
662
+ 493
663
+ 494
664
+ 495</pre>
665
+ </td>
666
+ <td>
667
+ <pre class="code"><span class="info file"># File 'lib/option_lab/models.rb', line 487</span>
668
+
669
+ <span class='kw'>def</span> <span class='op'>==</span><span class='lparen'>(</span><span class='id identifier rubyid_other'>other</span><span class='rparen'>)</span>
670
+ <span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>unless</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="" title="OptionLab::Models::LaplaceInputs (class)">LaplaceInputs</a></span></span><span class='rparen'>)</span>
671
+
672
+ <span class='id identifier rubyid_stock_price'>stock_price</span> <span class='op'>==</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_stock_price'>stock_price</span> <span class='op'>&amp;&amp;</span>
673
+ <span class='id identifier rubyid_volatility'>volatility</span> <span class='op'>==</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_volatility'>volatility</span> <span class='op'>&amp;&amp;</span>
674
+ <span class='id identifier rubyid_years_to_target_date'>years_to_target_date</span> <span class='op'>==</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_years_to_target_date'>years_to_target_date</span> <span class='op'>&amp;&amp;</span>
675
+ <span class='id identifier rubyid_mu'>mu</span> <span class='op'>==</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_mu'>mu</span> <span class='op'>&amp;&amp;</span>
676
+ <span class='id identifier rubyid_model'>model</span> <span class='op'>==</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_model'>model</span>
677
+ <span class='kw'>end</span></pre>
678
+ </td>
679
+ </tr>
680
+ </table>
681
+ </div>
682
+
683
+ <div class="method_details ">
684
+ <h3 class="signature " id="hash-instance_method">
685
+
686
+ #<strong>hash</strong> &#x21d2; <tt>Object</tt>
687
+
688
+
689
+
690
+
691
+
692
+ </h3><table class="source_code">
693
+ <tr>
694
+ <td>
695
+ <pre class="lines">
696
+
697
+
698
+ 499
699
+ 500
700
+ 501</pre>
701
+ </td>
702
+ <td>
703
+ <pre class="code"><span class="info file"># File 'lib/option_lab/models.rb', line 499</span>
704
+
705
+ <span class='kw'>def</span> <span class='id identifier rubyid_hash'>hash</span>
706
+ <span class='lbracket'>[</span><span class='id identifier rubyid_stock_price'>stock_price</span><span class='comma'>,</span> <span class='id identifier rubyid_volatility'>volatility</span><span class='comma'>,</span> <span class='id identifier rubyid_years_to_target_date'>years_to_target_date</span><span class='comma'>,</span> <span class='id identifier rubyid_mu'>mu</span><span class='comma'>,</span> <span class='id identifier rubyid_model'>model</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_hash'>hash</span>
707
+ <span class='kw'>end</span></pre>
708
+ </td>
709
+ </tr>
710
+ </table>
711
+ </div>
712
+
713
+ <div class="method_details ">
714
+ <h3 class="signature " id="validate!-instance_method">
715
+
716
+ #<strong>validate!</strong> &#x21d2; <tt>Object</tt>
717
+
718
+
719
+
720
+
721
+
722
+ </h3><div class="docstring">
723
+ <div class="discussion">
724
+
725
+
726
+ </div>
727
+ </div>
728
+ <div class="tags">
729
+
730
+ <p class="tag_title">Raises:</p>
731
+ <ul class="raise">
732
+
733
+ <li>
734
+
735
+
736
+ <span class='type'>(<tt>ArgumentError</tt>)</span>
737
+
738
+
739
+
740
+ </li>
741
+
742
+ </ul>
743
+
744
+ </div><table class="source_code">
745
+ <tr>
746
+ <td>
747
+ <pre class="lines">
748
+
749
+
750
+ 483
751
+ 484
752
+ 485</pre>
753
+ </td>
754
+ <td>
755
+ <pre class="code"><span class="info file"># File 'lib/option_lab/models.rb', line 483</span>
756
+
757
+ <span class='kw'>def</span> <span class='id identifier rubyid_validate!'>validate!</span>
758
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>model must be &#39;laplace&#39;</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_model'>model</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>laplace</span><span class='tstring_end'>&#39;</span></span>
759
+ <span class='kw'>end</span></pre>
760
+ </td>
761
+ </tr>
762
+ </table>
763
+ </div>
764
+
765
+ </div>
766
+
767
+ </div>
768
+
769
+ <div id="footer">
770
+ Generated on Sun Apr 27 16:09:34 2025 by
771
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
772
+ 0.9.37 (ruby-3.3.3).
773
+ </div>
774
+
775
+ </div>
776
+ </body>
777
+ </html>