Like I said before, my function is not to be taken out of context. In the environment it is it functions flawlessly and performs its job. The inaccuracy in my function will cause an extra couple of 100 thousand seconds to show up at the end of each month, because I don't care that some months only have 30 or 28 days. Why this does not matter is because empty time slots do not get displayed. If every 30-second was printed even if no activity occurred during that time, then this would be a problem, because we would get a bunch of empty no-activity data slots at the end of certain months. However, the program only records activity, and non-activity is silently ignored. If there is no trading activity for 5 days, then no output is produced. So, that's why this problem is silently taken care of. The other reason is that when slicing intraday tick data, the slices are usually 30 seconds, 1 min, 5 min, 15 min, 30 min, 1 hr, 3 hr, or 24 hrs. The slices do not span over months. If they do, you're using the wrong program to slice data. All right. So, just wanted to explain why this function performs its job as expected in this situation and why it won't matter that it does not accurately converts date to seconds. I hope I explained it in a way that it was understandable.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.