rescale_share_price_rows

Documentation for eth_defi.hyperliquid.combined_analysis.rescale_share_price_rows function.

rescale_share_price_rows(prices_df, factor, row_positions=None)

Rescale synthetic share prices without changing the represented NAV.

Hyperliquid does not publish an investable vault share price or share supply. The scanners derive both values from rolling portfolio windows, so an otherwise equivalent re-read can use a different arbitrary unit. Multiplying share_price and dividing total_supply by the same factor preserves the invariant total_assets == share_price * total_supply while choosing a consistent unit.

Parameters
  • prices_df (pandas.DataFrame) – DataFrame containing a finite positive share_price column and, optionally, a total_supply column. Rows are modified in place.

  • factor (float) – Finite positive multiplier applied to share_price.

  • row_positions (Optional[collections.abc.Sequence[int]]) – Optional positional rows to rescale. When omitted every row is rescaled.

Returns

The same DataFrame instance after the unit rescaling.

Return type

pandas.DataFrame