MCPcopy Create free account
hub / github.com/QuantiaAI/helm-agents / pctChange

Function pctChange

packages/dataflows/src/returns.ts:68–73  ·  view source on GitHub ↗
(series: Series[], from: string, to: string)

Source from the content-addressed store, hash-verified

66}
67
68function pctChange(series: Series[], from: string, to: string): number | null {
69 const start = closeOn(series, from);
70 const end = closeOn(series, to);
71 if (start == null || end == null || start === 0) return null;
72 return ((end - start) / start) * 100;
73}
74
75function addDays(date: string, days: number): string {
76 const d = new Date(date + "T00:00:00Z");

Callers 1

computeReturnsFunction · 0.85

Calls 1

closeOnFunction · 0.85

Tested by

no test coverage detected