Skip to content

fnery/ndx_revenue_analyzer

Repository files navigation

ndx_revenue_analyzer

This repo contains ndx_revenue_analyzer.py, a simple python script to calculate the price to sales ratio (P/S) for $NDX, for the "live" $NDX price, by calculating exit fee revenues from Indexed Finance indices, during a specified time interval.

⚠️ You need an etherscan API key to run this. See comments within ndx_revenue_analyzer.py for more info.

For example, to calculate P/S since May 3 (when exit fees were introduced for all indices) through June 15th (inclusive):

#              dates (inclusive): START      END
$ python3 ndx_revenue_analyzer.py "2021-5-3" "2021-6-15"
NDX P/S ratio (based on 44-day avg revenue, annualized) = 90.9

By default, this script also saves a .png figure which breaks down revenue by index. For example, the command above generates the following plot:

revenue_per_index_2021-5-3_to_2021-6-15

About

Calculating the revenue of the @indexed-finance protocol

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages