Hey @Customminer great, sounds interesting, would love to learn a bit more about your thoughts behind the oscillation. Do you have some more info on the (fixed) formula and where can I learn a bit more about the Hertz asset? ... what day would be 0% etc. etc.
Hey,
Within my repo (
https://github.com/BTS-CM/scripts) the following files are worth looking at:
* hertz_calculator.xlsx : A spreadsheet for evaluating the effect of different sine wave variables (amplitude, period, etc).
* hertz-verification.py : Used for verifying that the phase offset lines up appropriately.
* hertz-feed.py : What you'd use if you don't use wackou or xeroc's price feed scripts.
Within wackou's repo, here's my code entries: (Note: The pull request #36 needs implemented, or you can change 1/3 to 0.14 if using this script library)
*
https://github.com/wackou/bts_tools/blob/master/bts_tools/feeds.py#L275*
https://github.com/wackou/bts_tools/blob/master/bts_tools/feeds.py#L441And within xeroc's repo: (Issue #25 addresses the inaccurate amplitude comments)
*
https://github.com/xeroc/bitshares-pricefeed/blob/master/bitshares_pricefeed/examples/hertz.yamlExample python code snippet:
hz_reference_timestamp = pendulum.parse(reference_timestamp).timestamp() # Retrieving the Bitshares2.0 genesis block timestamp
hz_period = pendulum.SECONDS_PER_DAY * period_days
hz_phase = pendulum.SECONDS_PER_DAY * phase_days
hz_waveform = math.sin(((((current_timestamp - (hz_reference_timestamp + hz_phase))/hz_period) % 1) * hz_period) * ((2*math.pi)/hz_period)) # Only change for an alternative HERTZ ABA.
hz_value = reference_asset_value + ((amplitude * reference_asset_value) * hz_waveform)
---
So The idea is that with 14% amplitude, and a period of 28 days the value changes 2% every day. We use a phase offset (date/time) to make Wednesday (mid working week) the most important day for Hertz. On Wednesdays, Hertz price feed should be: $1.00 (start), $1.14 (first week passed), $1.00 (2nd week passed), $0.86 (3rd week), $1.00 (final week -> repeat). Check out the spreadsheet calculator to see the value through the month.
I've got some thoughts regarding how the market could potentially react:
https://steemit.com/hertz/@cm-steem/what-is-the-hertz-algorithm-based-assetRegarding oscillation, I believe that we could create phases of buying and sell pressure (through debt destruction as the price feed decreases & price appreciation as it increases), whether this will be realized and become popular is unknown. To make the first Hertz token stable, I significantly reduced the planned amplitude from 50% to 14%. A high amplitude would require high frequency price feed publishing, by decreasing the amplitude I was able to increase the maximum pricefeed lifetime from 220 to 1440 (more acceptable for publishers, hopefully).
Ideally, if this succeeds, we'll see similar algorithm based assets issued which oscillate using different wave equations (cos instead of sin) as well as different hertz parameters (within reason) and backing asset. The reason I created the spreadsheet calculator was for not just my own research but to spread the idea so that others may consider making similar ABAs.
It'd be interesting to create an opposite hertz token with the same parameters except a 2 week phase offset to produce the exact opposite price feed modification/oscillation.
Do you have any specific questions about Hertz?