generate_cleaned_vault_datasets

Documentation for eth_defi.research.wrangle_vault_prices.generate_cleaned_vault_datasets function.

generate_cleaned_vault_datasets(vault_db_path=PosixPath('/home/runner/.tradingstrategy/vaults/vault-metadata-db.pickle'), price_df_path=PosixPath('/home/runner/.tradingstrategy/vaults/vault-prices-1h.parquet'), cleaned_price_df_path=PosixPath('/home/runner/.tradingstrategy/vaults/cleaned-vault-prices-1h.parquet'), settlement_db_path=None, logger=<built-in function print>, display=<function display>, diagnose_vault_id=None)

A command line script entry point to take raw scanned vault price data and clean it up to a format that can be analysed.

  • Reads vault-prices-1h.parquet and generates cleaned-vault-prices-1h.parquet

  • Calculate returns and various performance metrics to be included with prices data

  • Clean returns from abnormalities

  • Stamp the cleaned Parquet with the current Docker metadata.version provenance, matching vault scanner JSON exports

Note

Drops non-stablecoin vaults. The cleaning is currently applicable for stable vaults only.

Parameters