aiden-shared-calculations-unified 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,7 +17,7 @@ class AssetDollarMetrics {
17
17
  }
18
18
  }
19
19
 
20
- process(portfolioData, userId, context) {
20
+ process(portfolioData, yesterdayPortfolio, userId, context, todayInsights, yesterdayInsights) {
21
21
  const { instrumentMappings } = context;
22
22
 
23
23
  // FIX: Use the correct portfolio position properties
@@ -9,7 +9,7 @@ class AssetPositionSize {
9
9
  this.mappings = null;
10
10
  }
11
11
 
12
- process(portfolioData, userId, context) {
12
+ process(portfolioData, yesterdayPortfolio, userId, context, todayInsights, yesterdayInsights) {
13
13
  const positions = portfolioData.AggregatedPositions || portfolioData.PublicPositions;
14
14
  if (!positions || !Array.isArray(positions)) return;
15
15
 
@@ -12,8 +12,8 @@ class AssetPnlStatus {
12
12
  this.assets[ticker] = { profit_count: 0, loss_count: 0 };
13
13
  }
14
14
  }
15
-
16
- process(portfolioData, userId, context) {
15
+
16
+ process(portfolioData, yesterdayPortfolio, userId, context, todayInsights, yesterdayInsights) {
17
17
  const { instrumentMappings } = context;
18
18
  const processedTickers = new Set(); // Ensure one user is only counted once per ticker
19
19
 
@@ -17,7 +17,7 @@ class SectorDollarMetrics {
17
17
  }
18
18
  }
19
19
 
20
- process(portfolioData, userId, context) {
20
+ process(portfolioData, yesterdayPortfolio, userId, context, todayInsights, yesterdayInsights) {
21
21
  const { sectorMapping } = context; // Assumes sectorMapping is in context
22
22
 
23
23
  // FIX: Use the correct portfolio position properties
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aiden-shared-calculations-unified",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Shared calculation modules for the BullTrackers Computation System.",
5
5
  "main": "index.js",
6
6
  "files": [