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,848 @@
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::PricingResult
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::PricingResult";
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 (P)</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">PricingResult</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::PricingResult
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::PricingResult</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>Option pricing result with prices and Greeks</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="#delta-instance_method" title="#delta (instance method)">#<strong>delta</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 delta.</p>
142
+ </div></span>
143
+
144
+ </li>
145
+
146
+
147
+ <li class="public ">
148
+ <span class="summary_signature">
149
+
150
+ <a href="#gamma-instance_method" title="#gamma (instance method)">#<strong>gamma</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 gamma.</p>
168
+ </div></span>
169
+
170
+ </li>
171
+
172
+
173
+ <li class="public ">
174
+ <span class="summary_signature">
175
+
176
+ <a href="#model-instance_method" title="#model (instance method)">#<strong>model</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 model.</p>
194
+ </div></span>
195
+
196
+ </li>
197
+
198
+
199
+ <li class="public ">
200
+ <span class="summary_signature">
201
+
202
+ <a href="#parameters-instance_method" title="#parameters (instance method)">#<strong>parameters</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 parameters.</p>
220
+ </div></span>
221
+
222
+ </li>
223
+
224
+
225
+ <li class="public ">
226
+ <span class="summary_signature">
227
+
228
+ <a href="#price-instance_method" title="#price (instance method)">#<strong>price</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 price.</p>
246
+ </div></span>
247
+
248
+ </li>
249
+
250
+
251
+ <li class="public ">
252
+ <span class="summary_signature">
253
+
254
+ <a href="#rho-instance_method" title="#rho (instance method)">#<strong>rho</strong> &#x21d2; Object </a>
255
+
256
+
257
+
258
+ </span>
259
+
260
+
261
+
262
+
263
+
264
+
265
+
266
+
267
+
268
+
269
+
270
+
271
+ <span class="summary_desc"><div class='inline'><p>Returns the value of attribute rho.</p>
272
+ </div></span>
273
+
274
+ </li>
275
+
276
+
277
+ <li class="public ">
278
+ <span class="summary_signature">
279
+
280
+ <a href="#theta-instance_method" title="#theta (instance method)">#<strong>theta</strong> &#x21d2; Object </a>
281
+
282
+
283
+
284
+ </span>
285
+
286
+
287
+
288
+
289
+
290
+
291
+
292
+
293
+
294
+
295
+
296
+
297
+ <span class="summary_desc"><div class='inline'><p>Returns the value of attribute theta.</p>
298
+ </div></span>
299
+
300
+ </li>
301
+
302
+
303
+ <li class="public ">
304
+ <span class="summary_signature">
305
+
306
+ <a href="#vega-instance_method" title="#vega (instance method)">#<strong>vega</strong> &#x21d2; Object </a>
307
+
308
+
309
+
310
+ </span>
311
+
312
+
313
+
314
+
315
+
316
+
317
+
318
+
319
+
320
+
321
+
322
+
323
+ <span class="summary_desc"><div class='inline'><p>Returns the value of attribute vega.</p>
324
+ </div></span>
325
+
326
+ </li>
327
+
328
+
329
+ </ul>
330
+
331
+
332
+
333
+
334
+
335
+ <h2>
336
+ Instance Method Summary
337
+ <small><a href="#" class="summary_toggle">collapse</a></small>
338
+ </h2>
339
+
340
+ <ul class="summary">
341
+
342
+ <li class="public ">
343
+ <span class="summary_signature">
344
+
345
+ <a href="#to_h-instance_method" title="#to_h (instance method)">#<strong>to_h</strong> &#x21d2; Object </a>
346
+
347
+
348
+
349
+ </span>
350
+
351
+
352
+
353
+
354
+
355
+
356
+
357
+
358
+
359
+ <span class="summary_desc"><div class='inline'></div></span>
360
+
361
+ </li>
362
+
363
+
364
+ <li class="public ">
365
+ <span class="summary_signature">
366
+
367
+ <a href="#to_s-instance_method" title="#to_s (instance method)">#<strong>to_s</strong> &#x21d2; Object </a>
368
+
369
+
370
+
371
+ </span>
372
+
373
+
374
+
375
+
376
+
377
+
378
+
379
+
380
+
381
+ <span class="summary_desc"><div class='inline'></div></span>
382
+
383
+ </li>
384
+
385
+
386
+ </ul>
387
+
388
+
389
+
390
+
391
+ <div id="constructor_details" class="method_details_list">
392
+ <h2>Constructor Details</h2>
393
+
394
+ <p class="notice">This class inherits a constructor from <span class='object_link'><a href="BaseModel.html#initialize-instance_method" title="OptionLab::Models::BaseModel#initialize (method)">OptionLab::Models::BaseModel</a></span></p>
395
+
396
+ </div>
397
+
398
+ <div id="instance_attr_details" class="attr_details">
399
+ <h2>Instance Attribute Details</h2>
400
+
401
+
402
+ <span id="delta=-instance_method"></span>
403
+ <div class="method_details first">
404
+ <h3 class="signature first" id="delta-instance_method">
405
+
406
+ #<strong>delta</strong> &#x21d2; <tt>Object</tt>
407
+
408
+
409
+
410
+
411
+
412
+ </h3><div class="docstring">
413
+ <div class="discussion">
414
+ <p>Returns the value of attribute delta.</p>
415
+
416
+
417
+ </div>
418
+ </div>
419
+ <div class="tags">
420
+
421
+
422
+ </div><table class="source_code">
423
+ <tr>
424
+ <td>
425
+ <pre class="lines">
426
+
427
+
428
+ 675
429
+ 676
430
+ 677</pre>
431
+ </td>
432
+ <td>
433
+ <pre class="code"><span class="info file"># File 'lib/option_lab/models.rb', line 675</span>
434
+
435
+ <span class='kw'>def</span> <span class='id identifier rubyid_delta'>delta</span>
436
+ <span class='ivar'>@delta</span>
437
+ <span class='kw'>end</span></pre>
438
+ </td>
439
+ </tr>
440
+ </table>
441
+ </div>
442
+
443
+
444
+ <span id="gamma=-instance_method"></span>
445
+ <div class="method_details ">
446
+ <h3 class="signature " id="gamma-instance_method">
447
+
448
+ #<strong>gamma</strong> &#x21d2; <tt>Object</tt>
449
+
450
+
451
+
452
+
453
+
454
+ </h3><div class="docstring">
455
+ <div class="discussion">
456
+ <p>Returns the value of attribute gamma.</p>
457
+
458
+
459
+ </div>
460
+ </div>
461
+ <div class="tags">
462
+
463
+
464
+ </div><table class="source_code">
465
+ <tr>
466
+ <td>
467
+ <pre class="lines">
468
+
469
+
470
+ 675
471
+ 676
472
+ 677</pre>
473
+ </td>
474
+ <td>
475
+ <pre class="code"><span class="info file"># File 'lib/option_lab/models.rb', line 675</span>
476
+
477
+ <span class='kw'>def</span> <span class='id identifier rubyid_gamma'>gamma</span>
478
+ <span class='ivar'>@gamma</span>
479
+ <span class='kw'>end</span></pre>
480
+ </td>
481
+ </tr>
482
+ </table>
483
+ </div>
484
+
485
+
486
+ <span id="model=-instance_method"></span>
487
+ <div class="method_details ">
488
+ <h3 class="signature " id="model-instance_method">
489
+
490
+ #<strong>model</strong> &#x21d2; <tt>Object</tt>
491
+
492
+
493
+
494
+
495
+
496
+ </h3><div class="docstring">
497
+ <div class="discussion">
498
+ <p>Returns the value of attribute model.</p>
499
+
500
+
501
+ </div>
502
+ </div>
503
+ <div class="tags">
504
+
505
+
506
+ </div><table class="source_code">
507
+ <tr>
508
+ <td>
509
+ <pre class="lines">
510
+
511
+
512
+ 675
513
+ 676
514
+ 677</pre>
515
+ </td>
516
+ <td>
517
+ <pre class="code"><span class="info file"># File 'lib/option_lab/models.rb', line 675</span>
518
+
519
+ <span class='kw'>def</span> <span class='id identifier rubyid_model'>model</span>
520
+ <span class='ivar'>@model</span>
521
+ <span class='kw'>end</span></pre>
522
+ </td>
523
+ </tr>
524
+ </table>
525
+ </div>
526
+
527
+
528
+ <span id="parameters=-instance_method"></span>
529
+ <div class="method_details ">
530
+ <h3 class="signature " id="parameters-instance_method">
531
+
532
+ #<strong>parameters</strong> &#x21d2; <tt>Object</tt>
533
+
534
+
535
+
536
+
537
+
538
+ </h3><div class="docstring">
539
+ <div class="discussion">
540
+ <p>Returns the value of attribute parameters.</p>
541
+
542
+
543
+ </div>
544
+ </div>
545
+ <div class="tags">
546
+
547
+
548
+ </div><table class="source_code">
549
+ <tr>
550
+ <td>
551
+ <pre class="lines">
552
+
553
+
554
+ 675
555
+ 676
556
+ 677</pre>
557
+ </td>
558
+ <td>
559
+ <pre class="code"><span class="info file"># File 'lib/option_lab/models.rb', line 675</span>
560
+
561
+ <span class='kw'>def</span> <span class='id identifier rubyid_parameters'>parameters</span>
562
+ <span class='ivar'>@parameters</span>
563
+ <span class='kw'>end</span></pre>
564
+ </td>
565
+ </tr>
566
+ </table>
567
+ </div>
568
+
569
+
570
+ <span id="price=-instance_method"></span>
571
+ <div class="method_details ">
572
+ <h3 class="signature " id="price-instance_method">
573
+
574
+ #<strong>price</strong> &#x21d2; <tt>Object</tt>
575
+
576
+
577
+
578
+
579
+
580
+ </h3><div class="docstring">
581
+ <div class="discussion">
582
+ <p>Returns the value of attribute price.</p>
583
+
584
+
585
+ </div>
586
+ </div>
587
+ <div class="tags">
588
+
589
+
590
+ </div><table class="source_code">
591
+ <tr>
592
+ <td>
593
+ <pre class="lines">
594
+
595
+
596
+ 675
597
+ 676
598
+ 677</pre>
599
+ </td>
600
+ <td>
601
+ <pre class="code"><span class="info file"># File 'lib/option_lab/models.rb', line 675</span>
602
+
603
+ <span class='kw'>def</span> <span class='id identifier rubyid_price'>price</span>
604
+ <span class='ivar'>@price</span>
605
+ <span class='kw'>end</span></pre>
606
+ </td>
607
+ </tr>
608
+ </table>
609
+ </div>
610
+
611
+
612
+ <span id="rho=-instance_method"></span>
613
+ <div class="method_details ">
614
+ <h3 class="signature " id="rho-instance_method">
615
+
616
+ #<strong>rho</strong> &#x21d2; <tt>Object</tt>
617
+
618
+
619
+
620
+
621
+
622
+ </h3><div class="docstring">
623
+ <div class="discussion">
624
+ <p>Returns the value of attribute rho.</p>
625
+
626
+
627
+ </div>
628
+ </div>
629
+ <div class="tags">
630
+
631
+
632
+ </div><table class="source_code">
633
+ <tr>
634
+ <td>
635
+ <pre class="lines">
636
+
637
+
638
+ 675
639
+ 676
640
+ 677</pre>
641
+ </td>
642
+ <td>
643
+ <pre class="code"><span class="info file"># File 'lib/option_lab/models.rb', line 675</span>
644
+
645
+ <span class='kw'>def</span> <span class='id identifier rubyid_rho'>rho</span>
646
+ <span class='ivar'>@rho</span>
647
+ <span class='kw'>end</span></pre>
648
+ </td>
649
+ </tr>
650
+ </table>
651
+ </div>
652
+
653
+
654
+ <span id="theta=-instance_method"></span>
655
+ <div class="method_details ">
656
+ <h3 class="signature " id="theta-instance_method">
657
+
658
+ #<strong>theta</strong> &#x21d2; <tt>Object</tt>
659
+
660
+
661
+
662
+
663
+
664
+ </h3><div class="docstring">
665
+ <div class="discussion">
666
+ <p>Returns the value of attribute theta.</p>
667
+
668
+
669
+ </div>
670
+ </div>
671
+ <div class="tags">
672
+
673
+
674
+ </div><table class="source_code">
675
+ <tr>
676
+ <td>
677
+ <pre class="lines">
678
+
679
+
680
+ 675
681
+ 676
682
+ 677</pre>
683
+ </td>
684
+ <td>
685
+ <pre class="code"><span class="info file"># File 'lib/option_lab/models.rb', line 675</span>
686
+
687
+ <span class='kw'>def</span> <span class='id identifier rubyid_theta'>theta</span>
688
+ <span class='ivar'>@theta</span>
689
+ <span class='kw'>end</span></pre>
690
+ </td>
691
+ </tr>
692
+ </table>
693
+ </div>
694
+
695
+
696
+ <span id="vega=-instance_method"></span>
697
+ <div class="method_details ">
698
+ <h3 class="signature " id="vega-instance_method">
699
+
700
+ #<strong>vega</strong> &#x21d2; <tt>Object</tt>
701
+
702
+
703
+
704
+
705
+
706
+ </h3><div class="docstring">
707
+ <div class="discussion">
708
+ <p>Returns the value of attribute vega.</p>
709
+
710
+
711
+ </div>
712
+ </div>
713
+ <div class="tags">
714
+
715
+
716
+ </div><table class="source_code">
717
+ <tr>
718
+ <td>
719
+ <pre class="lines">
720
+
721
+
722
+ 675
723
+ 676
724
+ 677</pre>
725
+ </td>
726
+ <td>
727
+ <pre class="code"><span class="info file"># File 'lib/option_lab/models.rb', line 675</span>
728
+
729
+ <span class='kw'>def</span> <span class='id identifier rubyid_vega'>vega</span>
730
+ <span class='ivar'>@vega</span>
731
+ <span class='kw'>end</span></pre>
732
+ </td>
733
+ </tr>
734
+ </table>
735
+ </div>
736
+
737
+ </div>
738
+
739
+
740
+ <div id="instance_method_details" class="method_details_list">
741
+ <h2>Instance Method Details</h2>
742
+
743
+
744
+ <div class="method_details first">
745
+ <h3 class="signature first" id="to_h-instance_method">
746
+
747
+ #<strong>to_h</strong> &#x21d2; <tt>Object</tt>
748
+
749
+
750
+
751
+
752
+
753
+ </h3><table class="source_code">
754
+ <tr>
755
+ <td>
756
+ <pre class="lines">
757
+
758
+
759
+ 695
760
+ 696
761
+ 697
762
+ 698
763
+ 699
764
+ 700
765
+ 701
766
+ 702
767
+ 703
768
+ 704
769
+ 705
770
+ 706</pre>
771
+ </td>
772
+ <td>
773
+ <pre class="code"><span class="info file"># File 'lib/option_lab/models.rb', line 695</span>
774
+
775
+ <span class='kw'>def</span> <span class='id identifier rubyid_to_h'>to_h</span>
776
+ <span class='lbrace'>{</span>
777
+ <span class='label'>price:</span> <span class='id identifier rubyid_price'>price</span><span class='comma'>,</span>
778
+ <span class='label'>delta:</span> <span class='id identifier rubyid_delta'>delta</span><span class='comma'>,</span>
779
+ <span class='label'>gamma:</span> <span class='id identifier rubyid_gamma'>gamma</span><span class='comma'>,</span>
780
+ <span class='label'>theta:</span> <span class='id identifier rubyid_theta'>theta</span><span class='comma'>,</span>
781
+ <span class='label'>vega:</span> <span class='id identifier rubyid_vega'>vega</span><span class='comma'>,</span>
782
+ <span class='label'>rho:</span> <span class='id identifier rubyid_rho'>rho</span><span class='comma'>,</span>
783
+ <span class='label'>model:</span> <span class='id identifier rubyid_model'>model</span><span class='comma'>,</span>
784
+ <span class='label'>parameters:</span> <span class='id identifier rubyid_parameters'>parameters</span><span class='comma'>,</span>
785
+ <span class='rbrace'>}</span>
786
+ <span class='kw'>end</span></pre>
787
+ </td>
788
+ </tr>
789
+ </table>
790
+ </div>
791
+
792
+ <div class="method_details ">
793
+ <h3 class="signature " id="to_s-instance_method">
794
+
795
+ #<strong>to_s</strong> &#x21d2; <tt>Object</tt>
796
+
797
+
798
+
799
+
800
+
801
+ </h3><table class="source_code">
802
+ <tr>
803
+ <td>
804
+ <pre class="lines">
805
+
806
+
807
+ 684
808
+ 685
809
+ 686
810
+ 687
811
+ 688
812
+ 689
813
+ 690
814
+ 691
815
+ 692
816
+ 693</pre>
817
+ </td>
818
+ <td>
819
+ <pre class="code"><span class="info file"># File 'lib/option_lab/models.rb', line 684</span>
820
+
821
+ <span class='kw'>def</span> <span class='id identifier rubyid_to_s'>to_s</span>
822
+ <span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Option Price: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_price'>price</span><span class='period'>.</span><span class='id identifier rubyid_round'>round</span><span class='lparen'>(</span><span class='int'>4</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span>
823
+ <span class='id identifier rubyid_result'>result</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Delta: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_delta'>delta</span><span class='period'>.</span><span class='id identifier rubyid_round'>round</span><span class='lparen'>(</span><span class='int'>4</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_delta'>delta</span>
824
+ <span class='id identifier rubyid_result'>result</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Gamma: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_gamma'>gamma</span><span class='period'>.</span><span class='id identifier rubyid_round'>round</span><span class='lparen'>(</span><span class='int'>4</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_gamma'>gamma</span>
825
+ <span class='id identifier rubyid_result'>result</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Theta: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_theta'>theta</span><span class='period'>.</span><span class='id identifier rubyid_round'>round</span><span class='lparen'>(</span><span class='int'>4</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_theta'>theta</span>
826
+ <span class='id identifier rubyid_result'>result</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Vega: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_vega'>vega</span><span class='period'>.</span><span class='id identifier rubyid_round'>round</span><span class='lparen'>(</span><span class='int'>4</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_vega'>vega</span>
827
+ <span class='id identifier rubyid_result'>result</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Rho: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_rho'>rho</span><span class='period'>.</span><span class='id identifier rubyid_round'>round</span><span class='lparen'>(</span><span class='int'>4</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_rho'>rho</span>
828
+ <span class='id identifier rubyid_result'>result</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Model: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_model'>model</span><span class='embexpr_end'>}</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_model'>model</span>
829
+ <span class='id identifier rubyid_result'>result</span>
830
+ <span class='kw'>end</span></pre>
831
+ </td>
832
+ </tr>
833
+ </table>
834
+ </div>
835
+
836
+ </div>
837
+
838
+ </div>
839
+
840
+ <div id="footer">
841
+ Generated on Sun Apr 27 16:09:34 2025 by
842
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
843
+ 0.9.37 (ruby-3.3.3).
844
+ </div>
845
+
846
+ </div>
847
+ </body>
848
+ </html>