Closed wilsonfreitas closed 2 years ago
@wilsonfreitas Im not sure I get it. Function yc_get
already accepts a first and last date. If user wants just one date, use the same string in both inputs.. If user wants a particular vector of dates, just filter the output data from the whole period.
But, if you fell it is worth the work, do it. I'm not particularly picky about this stuff, as long as it works as intended.
It's all about API design. I realy like to think of APIs that are inspiring and make the users happy to use them. From an API point of view, it is very important to express clearly its main objective. Being honest, I don't like the idea of having to declare two dates to get one date in return.
I will go on with this topic and keep you informed.
Done
I rarely use yield curves for multiples dates. In instruments pricing the common use is to fetch the yield curve for one specific date and price the financial instruments with that curve.
So, my suggestion is: use yc_mget for multiple dates, following the same interface that is now used in yc_get. And yc_get should return one single curve for the given date.
The same can be applied to futures_get:
futures_mget
for multiple dates andfutures_get
for a single date.get
andmget
names are commonly used in nosql databases to express the same behavior/idea.@msperlin what do you think about that?