File: optsurf.net

package info (click to toggle)
dxsamples 4.4.0-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 26,340 kB
  • sloc: ansic: 10,079; sh: 8,445; java: 1,772; makefile: 1,102
file content (710 lines) | stat: -rw-r--r-- 24,823 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
//
// time: Wed Nov 25 12:11:55 1998
//
// version: 3.1.2 (format), 4.1.1 (DX Beta)
//
//
//
// macro reference (direct): lognpdf /a/raster/homes/raster/c1tignor/ibm6000/samples/java/pdflogn.net
include "pdflogn.net"
//
// Begin MDF
// MODULE OptionSurface
// CATEGORY Options
// DESCRIPTION Rubbersheeted Call or Put
// INPUT field; field; (none);  2D field of Stock and sdev values
// INPUT intRate; object; (none);  1 + r
// INPUT t; value list or field or string or string list; (none);  Time to Maturity
// INPUT K; object; (none);  Strike Price
// INPUT optPrice; object; (none);  What you paid for the Option
// INPUT type; integer; (no default); 1(buy call) 2(buy put) 3(sell short) 4(write call) 5(write put) 6(buy long)
// INPUT currentPrice; value list or field or string or string list; (no default); Price of Stock at t0
// OUTPUT sheet; object;  Rubbersheet with N(z) data values
// OUTPUT cnxs; object;  Connections in sheet
// OUTPUT profit; object; 2D Profit data
// End MDF
// page assignment: buy call	order=4, windowed=0, showing=0
// page assignment: buy put	order=5, windowed=0, showing=0
// page assignment: buy share	order=2, windowed=0, showing=0
// page assignment: data	order=9, windowed=0, showing=1
// page assignment: sell short	order=6, windowed=0, showing=0
// page assignment: which price	order=3, windowed=0, showing=0
// page assignment: write call	order=7, windowed=0, showing=0
// page assignment: write put	order=8, windowed=0, showing=0
// workspace: width = 721, height = 702
// layout: snap = 0, width = 50, height = 50, align = NN
//
macro OptionSurface(
 field
,intRate
,t
,K
,optPrice
,type
,currentPrice
) -> (
 sheet
,cnxs
,profit
) {
    // 
    // node Input[7]: x = 0, y = 0, inputs = 0, label = Input
    // page group: data
    // parameter: position = 1, name = 'field', value = '(none)', descriptive = 1, description = ' 2D field of Stock and sdev values', required = 1, visible = 1
    //
OptionSurface_Input_7_out_1 = field;
    // 
    // node Extract[2]: x = 14, y = 379, inputs = 2, label = Extract
    // input[2]: defaulting = 0, visible = 1, type = 32, value = "positions"
    // page group: data
    //
OptionSurface_Extract_2_out_1 = 
    Extract(
    OptionSurface_Input_7_out_1,
    "positions"
    ) [instance: 2, cache: 1];
    // 
    // node Replace[2]: x = 88, y = 435, inputs = 4, label = Replace
    // page group: data
    //
OptionSurface_Replace_2_out_1 = 
    Replace(
    OptionSurface_Extract_2_out_1,
    OptionSurface_Input_7_out_1,
    NULL,
    NULL
    ) [instance: 2, cache: 1];
    // 
    // node Compute[15]: x = 138, y = 540, inputs = 2, label = Compute
    // input[1]: defaulting = 0, visible = 0, type = 32, value = "$0.y"
    // page group: data
    // expression: value = a.y
    // name[2]: value = a
    //
OptionSurface_Compute_15_out_1 = 
    Compute(
    "$0.y",
    OptionSurface_Replace_2_out_1
    ) [instance: 15, cache: 1];
    // 
    // node Compute[16]: x = 0, y = 538, inputs = 2, label = Compute
    // input[1]: defaulting = 0, visible = 0, type = 32, value = "$0.x"
    // page group: data
    // expression: value = a.x
    // name[2]: value = a
    //
OptionSurface_Compute_16_out_1 = 
    Compute(
    "$0.x",
    OptionSurface_Replace_2_out_1
    ) [instance: 16, cache: 1];
    // 
    // node Transmitter[28]: x = 204, y = 452, inputs = 1, label = plan
    // page group: data
    //
plan = OptionSurface_Input_7_out_1;
    // 
    // node Receiver[47]: x = 20, y = 20, inputs = 1, label = plan
    // page group: buy call
    //
OptionSurface_Receiver_47_out_1[cache: 0] = plan;
    // 
    // node Mark[2]: x = 24, y = 124, inputs = 2, label = Mark
    // input[2]: defaulting = 0, visible = 1, type = 32, value = "positions"
    // page group: buy call
    //
OptionSurface_Mark_2_out_1 = 
    Mark(
    OptionSurface_Receiver_47_out_1,
    "positions"
    ) [instance: 2, cache: 1];
    // 
    // node Input[11]: x = 382, y = 0, inputs = 0, label = Input
    // page group: data
    // parameter: position = 5, name = 'optPrice', value = '(none)', descriptive = 1, description = ' What you paid for the Option', required = 1, visible = 1
    //
OptionSurface_Input_11_out_1 = optPrice;
    // 
    // node Transmitter[40]: x = 391, y = 83, inputs = 1, label = C
    // page group: data
    //
C = OptionSurface_Input_11_out_1;
    // 
    // node Receiver[68]: x = 90, y = 137, inputs = 1, label = C
    // page group: buy call
    //
OptionSurface_Receiver_68_out_1[cache: 0] = C;
    // 
    // node Input[10]: x = 167, y = 2, inputs = 0, label = Input
    // page group: data
    // parameter: position = 4, name = 'K', value = '(none)', descriptive = 1, description = ' Strike Price', required = 1, visible = 1
    //
OptionSurface_Input_10_out_1 = K;
    // 
    // node Transmitter[37]: x = 176, y = 83, inputs = 1, label = k
    // page group: data
    //
k = OptionSurface_Input_10_out_1;
    // 
    // node Receiver[65]: x = 121, y = 55, inputs = 1, label = k
    // page group: buy call
    //
OptionSurface_Receiver_65_out_1[cache: 0] = k;
    // 
    // node Compute[23]: x = 72, y = 220, inputs = 4, label = Compute
    // input[1]: defaulting = 0, visible = 0, type = 32, value = "(($0.x <= $2)? 0.0 : $0.x - $2) - $1"
    // page group: buy call
    // expression: value = ((StockPrice.x <= StrikePrice)? 0.0 : StockPrice.x - StrikePrice) - CallPrice
    // name[2]: value = StockPrice
    // name[3]: value = CallPrice
    // name[4]: value = StrikePrice
    //
OptionSurface_Compute_23_out_1 = 
    Compute(
    "(($0.x <= $2)? 0.0 : $0.x - $2) - $1",
    OptionSurface_Mark_2_out_1,
    OptionSurface_Receiver_68_out_1,
    OptionSurface_Receiver_65_out_1
    ) [instance: 23, cache: 1];
    // 
    // node Receiver[63]: x = 0, y = 28, inputs = 1, label = plan
    // page group: buy put
    //
OptionSurface_Receiver_63_out_1[cache: 0] = plan;
    // 
    // node Mark[3]: x = 11, y = 121, inputs = 2, label = Mark
    // input[2]: defaulting = 0, visible = 1, type = 32, value = "positions"
    // page group: buy put
    //
OptionSurface_Mark_3_out_1 = 
    Mark(
    OptionSurface_Receiver_63_out_1,
    "positions"
    ) [instance: 3, cache: 1];
    // 
    // node Receiver[69]: x = 80, y = 121, inputs = 1, label = C
    // page group: buy put
    //
OptionSurface_Receiver_69_out_1[cache: 0] = C;
    // 
    // node Receiver[66]: x = 132, y = 63, inputs = 1, label = k
    // page group: buy put
    //
OptionSurface_Receiver_66_out_1[cache: 0] = k;
    // 
    // node Compute[25]: x = 66, y = 224, inputs = 4, label = Compute
    // input[1]: defaulting = 0, visible = 0, type = 32, value = "(($0.x > $2)? 0.0 : $2- $0.x) - $1"
    // page group: buy put
    // expression: value = ((StockPrice.x > StrikePrice)? 0.0 : StrikePrice- StockPrice.x) - CallPrice
    // name[2]: value = StockPrice
    // name[3]: value = CallPrice
    // name[4]: value = StrikePrice
    //
OptionSurface_Compute_25_out_1 = 
    Compute(
    "(($0.x > $2)? 0.0 : $2- $0.x) - $1",
    OptionSurface_Mark_3_out_1,
    OptionSurface_Receiver_69_out_1,
    OptionSurface_Receiver_66_out_1
    ) [instance: 25, cache: 1];
    // 
    // node Receiver[71]: x = 17, y = 68, inputs = 1, label = plan
    // page group: sell short
    //
OptionSurface_Receiver_71_out_1[cache: 0] = plan;
    // 
    // node Mark[4]: x = 28, y = 161, inputs = 2, label = Mark
    // input[2]: defaulting = 0, visible = 1, type = 32, value = "positions"
    // page group: sell short
    //
OptionSurface_Mark_4_out_1 = 
    Mark(
    OptionSurface_Receiver_71_out_1,
    "positions"
    ) [instance: 4, cache: 1];
    // 
    // node Input[13]: x = 124, y = 102, inputs = 0, label = Input
    // page group: sell short
    // parameter: position = 7, name = 'currentPrice', value = '(no default)', descriptive = 1, description = 'Price of Stock at t0', required = 0, visible = 1
    //
OptionSurface_Input_13_out_1 = currentPrice;
    // 
    // node Compute[26]: x = 79, y = 266, inputs = 3, label = Compute
    // input[1]: defaulting = 0, visible = 0, type = 32, value = "$1 - $0.x"
    // page group: sell short
    // expression: value = PurchPrice - StockPrice.x
    // name[2]: value = StockPrice
    // name[3]: value = PurchPrice
    //
OptionSurface_Compute_26_out_1 = 
    Compute(
    "$1 - $0.x",
    OptionSurface_Mark_4_out_1,
    OptionSurface_Input_13_out_1
    ) [instance: 26, cache: 1];
    // 
    // node Receiver[74]: x = 27, y = 53, inputs = 1, label = plan
    // page group: write call
    //
OptionSurface_Receiver_74_out_1[cache: 0] = plan;
    // 
    // node Mark[5]: x = 31, y = 157, inputs = 2, label = Mark
    // input[2]: defaulting = 0, visible = 1, type = 32, value = "positions"
    // page group: write call
    //
OptionSurface_Mark_5_out_1 = 
    Mark(
    OptionSurface_Receiver_74_out_1,
    "positions"
    ) [instance: 5, cache: 1];
    // 
    // node Receiver[75]: x = 97, y = 170, inputs = 1, label = C
    // page group: write call
    //
OptionSurface_Receiver_75_out_1[cache: 0] = C;
    // 
    // node Receiver[76]: x = 128, y = 88, inputs = 1, label = k
    // page group: write call
    //
OptionSurface_Receiver_76_out_1[cache: 0] = k;
    // 
    // node Compute[27]: x = 78, y = 253, inputs = 4, label = Compute
    // input[1]: defaulting = 0, visible = 0, type = 32, value = "$1 - (($0.x <= $2)? 0.0 : $0.x - $2)"
    // page group: write call
    // expression: value = CallPrice - ((StockPrice.x <= StrikePrice)? 0.0 : StockPrice.x - StrikePrice)
    // name[2]: value = StockPrice
    // name[3]: value = CallPrice
    // name[4]: value = StrikePrice
    //
OptionSurface_Compute_27_out_1 = 
    Compute(
    "$1 - (($0.x <= $2)? 0.0 : $0.x - $2)",
    OptionSurface_Mark_5_out_1,
    OptionSurface_Receiver_75_out_1,
    OptionSurface_Receiver_76_out_1
    ) [instance: 27, cache: 1];
    // 
    // node Receiver[77]: x = 42, y = 64, inputs = 1, label = plan
    // page group: write put
    //
OptionSurface_Receiver_77_out_1[cache: 0] = plan;
    // 
    // node Mark[6]: x = 46, y = 168, inputs = 2, label = Mark
    // input[2]: defaulting = 0, visible = 1, type = 32, value = "positions"
    // page group: write put
    //
OptionSurface_Mark_6_out_1 = 
    Mark(
    OptionSurface_Receiver_77_out_1,
    "positions"
    ) [instance: 6, cache: 1];
    // 
    // node Receiver[78]: x = 112, y = 181, inputs = 1, label = C
    // page group: write put
    //
OptionSurface_Receiver_78_out_1[cache: 0] = C;
    // 
    // node Receiver[79]: x = 143, y = 99, inputs = 1, label = k
    // page group: write put
    //
OptionSurface_Receiver_79_out_1[cache: 0] = k;
    // 
    // node Compute[29]: x = 80, y = 262, inputs = 4, label = Compute
    // input[1]: defaulting = 0, visible = 0, type = 32, value = "$1 - (($0.x > $2)? 0.0 : $2- $0.x)"
    // page group: write put
    // expression: value = CallPrice - ((StockPrice.x > StrikePrice)? 0.0 : StrikePrice- StockPrice.x)
    // name[2]: value = StockPrice
    // name[3]: value = CallPrice
    // name[4]: value = StrikePrice
    //
OptionSurface_Compute_29_out_1 = 
    Compute(
    "$1 - (($0.x > $2)? 0.0 : $2- $0.x)",
    OptionSurface_Mark_6_out_1,
    OptionSurface_Receiver_78_out_1,
    OptionSurface_Receiver_79_out_1
    ) [instance: 29, cache: 1];
    // 
    // node Input[12]: x = 0, y = 0, inputs = 0, label = Input
    // page group: which price
    // parameter: position = 6, name = 'type', value = '(no default)', descriptive = 1, description = '1(buy call) 2(buy put) 3(sell short) 4(write call) 5(write put) 6(buy long)', required = 0, visible = 1
    //
OptionSurface_Input_12_out_1 = type;
    // 
    // node Compute[30]: x = 14, y = 376, inputs = 2, label = Compute
    // input[1]: defaulting = 0, visible = 0, type = 32, value = "(($0>=1) && ($0<=6))? 1: 2"
    // page group: which price
    // expression: value = ((a>=1) && (a<=6))? 1: 2
    // name[2]: value = a
    //
OptionSurface_Compute_30_out_1 = 
    Compute(
    "(($0>=1) && ($0<=6))? 1: 2",
    OptionSurface_Input_12_out_1
    ) [instance: 30, cache: 1];
    // 
    // node Receiver[146]: x = 34, y = 104, inputs = 1, label = plan
    // page group: buy share
    //
OptionSurface_Receiver_146_out_1[cache: 0] = plan;
    // 
    // node Mark[7]: x = 38, y = 208, inputs = 2, label = Mark
    // input[2]: defaulting = 0, visible = 1, type = 32, value = "positions"
    // page group: buy share
    //
OptionSurface_Mark_7_out_1 = 
    Mark(
    OptionSurface_Receiver_146_out_1,
    "positions"
    ) [instance: 7, cache: 1];
    // 
    // node Transmitter[75]: x = 190, y = 254, inputs = 1, label = purch
    // page group: sell short
    //
purch = OptionSurface_Input_13_out_1;
    // 
    // node Receiver[150]: x = 208, y = 177, inputs = 1, label = purch
    // page group: buy share
    //
OptionSurface_Receiver_150_out_1[cache: 0] = purch;
    // 
    // node Compute[39]: x = 50, y = 306, inputs = 3, label = Compute
    // input[1]: defaulting = 0, visible = 0, type = 32, value = "$0.x - $1"
    // page group: buy share
    // expression: value = StockPrice.x - PurchPrice
    // name[2]: value = StockPrice
    // name[3]: value = PurchPrice
    //
OptionSurface_Compute_39_out_1 = 
    Compute(
    "$0.x - $1",
    OptionSurface_Mark_7_out_1,
    OptionSurface_Receiver_150_out_1
    ) [instance: 39, cache: 1];
    // 
    // node Input[9]: x = 310, y = 2, inputs = 0, label = Input
    // page group: data
    // parameter: position = 3, name = 't', value = '(none)', descriptive = 1, description = ' Time to Maturity', required = 1, visible = 1
    //
OptionSurface_Input_9_out_1 = t;
    // 
    // node Receiver[188]: x = 363, y = 186, inputs = 1, label = purch
    // page group: data
    //
OptionSurface_Receiver_188_out_1[cache: 0] = purch;
    // 
    // node Compute[42]: x = 285, y = 289, inputs = 5, label = Compute
    // input[1]: defaulting = 0, visible = 0, type = 32, value = "log10($0/$3) / ($1*pow($2, 0.5))"
    // page group: data
    // expression: value = log10(S/k) / (sdev*pow(t, 0.5))
    // name[2]: value = S
    // name[3]: value = sdev
    // name[4]: value = t
    // name[5]: value = k
    //
OptionSurface_Compute_42_out_1 = 
    Compute(
    "log10($0/$3) / ($1*pow($2, 0.5))",
    OptionSurface_Compute_16_out_1,
    OptionSurface_Compute_15_out_1,
    OptionSurface_Input_9_out_1,
    OptionSurface_Receiver_188_out_1
    ) [instance: 42, cache: 1];
    // 
    // node Input[8]: x = 56, y = 0, inputs = 0, label = Input
    // page group: data
    // parameter: position = 2, name = 'intRate', value = '(none)', descriptive = 1, description = ' 1 + r', required = 1, visible = 1
    //
OptionSurface_Input_8_out_1 = intRate;
    // 
    // node Transmitter[49]: x = 12, y = 477, inputs = 1, label = validType
    // page group: which price
    //
validType = OptionSurface_Compute_30_out_1;
    // 
    // node Receiver[101]: x = 582, y = 323, inputs = 1, label = validType
    // page group: data
    //
OptionSurface_Receiver_101_out_1[cache: 0] = validType;
    // 
    // node lognpdf[7]: x = 293, y = 385, inputs = 1, label = lognpdf
    // page group: data
    //
OptionSurface_lognpdf_7_out_1 = 
    lognpdf(
    OptionSurface_Compute_42_out_1
    ) [instance: 7, cache: 1];
    // 
    // node Transmitter[32]: x = 314, y = 519, inputs = 1, label = prob
    // page group: data
    //
prob = OptionSurface_lognpdf_7_out_1;
    // 
    // node Receiver[52]: x = 488, y = 101, inputs = 1, label = prob
    // page group: data
    //
OptionSurface_Receiver_52_out_1[cache: 0] = prob;
    // 
    // node Transmitter[31]: x = 86, y = 306, inputs = 1, label = cprices
    // page group: buy call
    //
cprices = OptionSurface_Compute_23_out_1;
    // 
    // node Receiver[62]: x = 52, y = 0, inputs = 1, label = cprices
    // page group: which price
    //
OptionSurface_Receiver_62_out_1[cache: 0] = cprices;
    // 
    // node Transmitter[38]: x = 76, y = 311, inputs = 1, label = pprices
    // page group: buy put
    //
pprices = OptionSurface_Compute_25_out_1;
    // 
    // node Receiver[67]: x = 114, y = 0, inputs = 1, label = pprices
    // page group: which price
    //
OptionSurface_Receiver_67_out_1[cache: 0] = pprices;
    // 
    // node Transmitter[42]: x = 76, y = 358, inputs = 1, label = shrprices
    // page group: sell short
    //
shrprices = OptionSurface_Compute_26_out_1;
    // 
    // node Receiver[80]: x = 188, y = 0, inputs = 1, label = shrprices
    // page group: which price
    //
OptionSurface_Receiver_80_out_1[cache: 0] = shrprices;
    // 
    // node Transmitter[43]: x = 83, y = 343, inputs = 1, label = wcallprices
    // page group: write call
    //
wcallprices = OptionSurface_Compute_27_out_1;
    // 
    // node Receiver[81]: x = 317, y = 0, inputs = 1, label = wcallprices
    // page group: which price
    //
OptionSurface_Receiver_81_out_1[cache: 0] = wcallprices;
    // 
    // node Transmitter[44]: x = 98, y = 354, inputs = 1, label = wputprices
    // page group: write put
    //
wputprices = OptionSurface_Compute_29_out_1;
    // 
    // node Receiver[82]: x = 429, y = 0, inputs = 1, label = wputprices
    // page group: which price
    //
OptionSurface_Receiver_82_out_1[cache: 0] = wputprices;
    // 
    // node Transmitter[76]: x = 75, y = 435, inputs = 1, label = buyprices
    // page group: buy share
    //
buyprices = OptionSurface_Compute_39_out_1;
    // 
    // node Receiver[149]: x = 541, y = 0, inputs = 1, label = buyprices
    // page group: which price
    //
OptionSurface_Receiver_149_out_1[cache: 0] = buyprices;
    // 
    // node Switch[1]: x = 68, y = 253, inputs = 8, label = Switch
    // input[7]: defaulting = 1, visible = 1, type = 67108863, value = 0
    // input[8]: defaulting = 0, visible = 1, type = 67108863, value = 0
    // page group: which price
    //
OptionSurface_Switch_1_out_1 = 
    Switch(
    OptionSurface_Input_12_out_1,
    OptionSurface_Receiver_62_out_1,
    OptionSurface_Receiver_67_out_1,
    OptionSurface_Receiver_80_out_1,
    OptionSurface_Receiver_81_out_1,
    OptionSurface_Receiver_82_out_1,
    OptionSurface_Receiver_149_out_1,
    0
    ) [instance: 1, cache: 1];
    // 
    // node Transmitter[39]: x = 148, y = 383, inputs = 1, label = prices
    // page group: which price
    //
prices = OptionSurface_Switch_1_out_1;
    // 
    // node Receiver[51]: x = 615, y = 0, inputs = 1, label = prices
    // page group: data
    //
OptionSurface_Receiver_51_out_1[cache: 0] = prices;
    // 
    // node RubberSheet[2]: x = 602, y = 94, inputs = 4, label = RubberSheet
    // input[2]: defaulting = 0, visible = 1, type = 5, value = 1.0
    // page group: data
    //
OptionSurface_RubberSheet_2_out_1 = 
    RubberSheet(
    OptionSurface_Receiver_51_out_1,
    1.0,
    NULL,
    NULL
    ) [instance: 2, cache: 1];
    // 
    // node Replace[4]: x = 493, y = 194, inputs = 4, label = Replace
    // page group: data
    //
OptionSurface_Replace_4_out_1 = 
    Replace(
    OptionSurface_Receiver_52_out_1,
    OptionSurface_RubberSheet_2_out_1,
    NULL,
    NULL
    ) [instance: 4, cache: 1];
    // 
    // node Switch[3]: x = 535, y = 429, inputs = 3, label = Switch
    // input[3]: defaulting = 0, visible = 1, type = 16777245, value = NULL
    // page group: data
    //
OptionSurface_Switch_3_out_1 = 
    Switch(
    OptionSurface_Receiver_101_out_1,
    OptionSurface_Replace_4_out_1,
    NULL
    ) [instance: 3, cache: 1];
    // 
    // node Output[4]: x = 566, y = 529, inputs = 1, label = Output
    // page group: data
    // parameter: position = 1, name = 'sheet', value = ' ', descriptive = 0, description = ' Rubbersheet with N(z) data values', required = 0, visible = 1
    //
sheet = OptionSurface_Switch_3_out_1;
    // 
    // node ShowConnections[2]: x = 609, y = 192, inputs = 1, label = ShowConnections
    // page group: data
    //
OptionSurface_ShowConnections_2_out_1 = 
    ShowConnections(
    OptionSurface_RubberSheet_2_out_1
    ) [instance: 2, cache: 1];
    // 
    // node Switch[4]: x = 628, y = 425, inputs = 3, label = Switch
    // input[3]: defaulting = 0, visible = 1, type = 16777245, value = NULL
    // page group: data
    //
OptionSurface_Switch_4_out_1 = 
    Switch(
    OptionSurface_Receiver_101_out_1,
    OptionSurface_ShowConnections_2_out_1,
    NULL
    ) [instance: 4, cache: 1];
    // 
    // node Output[5]: x = 645, y = 528, inputs = 1, label = Output
    // page group: data
    // parameter: position = 2, name = 'cnxs', value = ' ', descriptive = 0, description = ' Connections in sheet', required = 0, visible = 1
    //
cnxs = OptionSurface_Switch_4_out_1;
    // 
    // node Receiver[135]: x = 412, y = 395, inputs = 1, label = prices
    // page group: data
    //
OptionSurface_Receiver_135_out_1[cache: 0] = prices;
    // 
    // node Switch[21]: x = 399, y = 496, inputs = 3, label = Switch
    // input[3]: defaulting = 0, visible = 1, type = 67108863, value = 0
    // page group: data
    //
OptionSurface_Switch_21_out_1 = 
    Switch(
    OptionSurface_Receiver_101_out_1,
    OptionSurface_Receiver_135_out_1,
    0
    ) [instance: 21, cache: 1];
    // 
    // node Output[6]: x = 418, y = 594, inputs = 1, label = Output
    // page group: data
    // parameter: position = 3, name = 'profit', value = ' ', descriptive = 0, description = '2D Profit data', required = 0, visible = 1
    //
profit = OptionSurface_Switch_21_out_1;
    // 
    // node Transmitter[12]: x = 149, y = 640, inputs = 1, label = sdev
    // input[1]: defaulting = 1, visible = 1, type = 67108863, value = {0.5}
    // page group: data
    //
sdev = OptionSurface_Compute_15_out_1;
    // 
    // node Transmitter[24]: x = 18, y = 619, inputs = 1, label = S
    // page group: data
    //
S = OptionSurface_Compute_16_out_1;
    // 
    // node Transmitter[34]: x = 62, y = 116, inputs = 1, label = r
    // page group: data
    //
r = OptionSurface_Input_8_out_1;
// network: end of macro body
}
OptionSurface_Input_7_out_1 = NULL;
OptionSurface_Extract_2_out_1 = NULL;
OptionSurface_Replace_2_out_1 = NULL;
OptionSurface_Compute_15_out_1 = NULL;
OptionSurface_Compute_16_out_1 = NULL;
OptionSurface_Transmitter_28_out_1 = NULL;
OptionSurface_Receiver_47_out_1 = NULL;
OptionSurface_Mark_2_out_1 = NULL;
OptionSurface_Input_11_out_1 = NULL;
OptionSurface_Transmitter_40_out_1 = NULL;
OptionSurface_Receiver_68_out_1 = NULL;
OptionSurface_Input_10_out_1 = NULL;
OptionSurface_Transmitter_37_out_1 = NULL;
OptionSurface_Receiver_65_out_1 = NULL;
OptionSurface_Compute_23_out_1 = NULL;
OptionSurface_Receiver_63_out_1 = NULL;
OptionSurface_Mark_3_out_1 = NULL;
OptionSurface_Receiver_69_out_1 = NULL;
OptionSurface_Receiver_66_out_1 = NULL;
OptionSurface_Compute_25_out_1 = NULL;
OptionSurface_Receiver_71_out_1 = NULL;
OptionSurface_Mark_4_out_1 = NULL;
OptionSurface_Input_13_out_1 = NULL;
OptionSurface_Compute_26_out_1 = NULL;
OptionSurface_Receiver_74_out_1 = NULL;
OptionSurface_Mark_5_out_1 = NULL;
OptionSurface_Receiver_75_out_1 = NULL;
OptionSurface_Receiver_76_out_1 = NULL;
OptionSurface_Compute_27_out_1 = NULL;
OptionSurface_Receiver_77_out_1 = NULL;
OptionSurface_Mark_6_out_1 = NULL;
OptionSurface_Receiver_78_out_1 = NULL;
OptionSurface_Receiver_79_out_1 = NULL;
OptionSurface_Compute_29_out_1 = NULL;
OptionSurface_Input_12_out_1 = NULL;
OptionSurface_Compute_30_out_1 = NULL;
OptionSurface_Receiver_146_out_1 = NULL;
OptionSurface_Mark_7_out_1 = NULL;
OptionSurface_Transmitter_75_out_1 = NULL;
OptionSurface_Receiver_150_out_1 = NULL;
OptionSurface_Compute_39_out_1 = NULL;
OptionSurface_Input_9_out_1 = NULL;
OptionSurface_Receiver_188_out_1 = NULL;
OptionSurface_Compute_42_out_1 = NULL;
OptionSurface_Input_8_out_1 = NULL;
OptionSurface_Transmitter_49_out_1 = NULL;
OptionSurface_Receiver_101_out_1 = NULL;
OptionSurface_lognpdf_7_out_1 = NULL;
OptionSurface_Transmitter_32_out_1 = NULL;
OptionSurface_Receiver_52_out_1 = NULL;
OptionSurface_Transmitter_31_out_1 = NULL;
OptionSurface_Receiver_62_out_1 = NULL;
OptionSurface_Transmitter_38_out_1 = NULL;
OptionSurface_Receiver_67_out_1 = NULL;
OptionSurface_Transmitter_42_out_1 = NULL;
OptionSurface_Receiver_80_out_1 = NULL;
OptionSurface_Transmitter_43_out_1 = NULL;
OptionSurface_Receiver_81_out_1 = NULL;
OptionSurface_Transmitter_44_out_1 = NULL;
OptionSurface_Receiver_82_out_1 = NULL;
OptionSurface_Transmitter_76_out_1 = NULL;
OptionSurface_Receiver_149_out_1 = NULL;
OptionSurface_Switch_1_out_1 = NULL;
OptionSurface_Transmitter_39_out_1 = NULL;
OptionSurface_Receiver_51_out_1 = NULL;
OptionSurface_RubberSheet_2_out_1 = NULL;
OptionSurface_Replace_4_out_1 = NULL;
OptionSurface_Switch_3_out_1 = NULL;
OptionSurface_ShowConnections_2_out_1 = NULL;
OptionSurface_Switch_4_out_1 = NULL;
OptionSurface_Receiver_135_out_1 = NULL;
OptionSurface_Switch_21_out_1 = NULL;