Adam Georgeson Posted January 15, 2019 Share Posted January 15, 2019 I have commodity prices that update every business day. I would like to define a new signal as the commodity price on the first business day of the current month. The formula $a.aggregate(startValue(),periods(1 month), startKey()).toStep() works great if the first day of the month is a business day. However, sometimes the first day of the month is not a business day, it is either a weekend or a holiday. So, the formula above returns nothing. How would I set up a Seeq formula to avoid this issue? Link to comment Share on other sites More sharing options...
Julianne Posted January 15, 2019 Share Posted January 15, 2019 Adam, I need a bit more information before I can answer this question. Could you please tell me how often you store a new price sample? You should be able to tell by clicking "Customize" and plotting the signal as a sample. Julianne Link to comment Share on other sites More sharing options...
Julianne Posted January 17, 2019 Share Posted January 17, 2019 Assuming your signal is only coming in with one sample at the start of every business day, you can modify your formula to the following to fix the issue: $a.toStep(1h).aggregate(startValue(true),periods(1 month), startKey()).toStep() Link to comment Share on other sites More sharing options...
Adam Georgeson Posted January 24, 2019 Author Share Posted January 24, 2019 Yes, the signal coming in is one sample at the start of every business day. Link to comment Share on other sites More sharing options...
Seeq Team Lindsey.Wilcox Posted January 25, 2019 Seeq Team Share Posted January 25, 2019 Hi Adam - did you have a chance to try the solution Julianne provided? Did it fix the issue you described? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.