You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -57,6 +60,107 @@ Within the latest build select, Artifacts > drop, then download either Cmdty.Sto
57
60
58
61
Examples of the Excel functions can be found in [samples/excel/storage_samples.xlsx](https://github.com/cmdty/storage/raw/master/samples/excel/storage_samples.xlsx).
59
62
63
+
## Using the C# API
64
+
65
+
### Creating the Storage Object
66
+
In order for storage capacity to be valued, first an instance of the class CmdtyStorage
67
+
needs to be created. The code sample below shows how the fluent builder API can be used
The above example is quite simple, with most parameters being constant, but much more complicated storage objects can be created. Once the Cmdty.Storage package has been installed,
94
+
a good way to discover the flexibility in the API is to look at the IntelliSense suggestions in
95
+
Visual Studio.
96
+
97
+
### Calculating the Intrinsic Value
98
+
The following example shows how to calculate the intrinsic value of the storage, including
99
+
the optimal intrinsic inject/withdraw decision profile.
When run, the above code prints the following to the console.
140
+
141
+
```
142
+
Calculated intrinsic storage NPV: 10827.21
143
+
144
+
Decision profile:
145
+
Count = 16
146
+
2019-09-15 5.26
147
+
2019-09-16 5.26
148
+
2019-09-17 5.26
149
+
2019-09-18 5.26
150
+
2019-09-19 5.26
151
+
2019-09-20 5.26
152
+
2019-09-21 5.26
153
+
2019-09-22 5.26
154
+
2019-09-23 -14.74
155
+
2019-09-24 -14.74
156
+
2019-09-25 0.00
157
+
2019-09-26 -14.74
158
+
2019-09-27 -14.74
159
+
2019-09-28 -14.74
160
+
2019-09-29 -14.74
161
+
2019-09-30 -3.64
162
+
```
163
+
60
164
## Building
61
165
Build scripts use [cake](https://github.com/cake-build/cake) and require [the .NET Core SDK](https://dotnet.microsoft.com/download) to be installed on the Windows machine performing the build.
0 commit comments