Skip to content

General post-processing function for plots #31

Open

Description

@AngelaKTE

Write a general function to transform dataframe zero to newdataframe for a specific plots.

Context:
When running the cadCAD we'll produce a dataframe ("dataframe zero") that will always have the same structure:

  • per timestep (=rows)
    columns:
  • a) token_a_balance...
  • b) token_b_balance ...etc
  • c) token_a_weight
  • d) token_b_weight...etc
  • e) token_a_denorm_weight
  • f) token_b_denorm_weight...etc
  • g) generated_fees
  • h) pool_shares
  • i) token_a_value
  • j) token_b_value...etc

After this step we'll create various plots, like comparing total TVL with liquidity (total number of tokens in the pool).

So the general procedure is:
take dataframe zero and create a newdataframe (e.g. named "c191) for simulation C1.9.1 in the notebook based on it:

  • compute TVL: take token_a_value+token_b_value...etc; and create a new column (TVL) to add TVL for every timestep(row)
  • compute liquidity: take token_a_balance+token_b_balance...etc; and create a new column(liq) to add liquidity for every timestep

and then plot a chart using newdataframe values:

Bildschirmfoto 2021-01-25 um 09 35 26

Activity

  1. added
    viz
    on Jan 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

viz

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions