aiden-shared-calculations-unified 1.0.15 → 1.0.16
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.
- package/calculations/behavioural/{asset_crowd_flow.js → historical/asset_crowd_flow.js} +2 -2
- package/calculations/behavioural/{smart_money_flow.js → historical/smart_money_flow.js} +1 -1
- package/calculations/sectors/{diversification_pnl.js → historical/diversification_pnl.js} +1 -1
- package/calculations/sectors/{sector_rotation.js → historical/sector_rotation.js} +1 -1
- package/calculations/sentiment/{crowd_conviction_score.js → historical/crowd_conviction_score.js} +1 -1
- package/package.json +1 -1
- /package/calculations/behavioural/{drawdown_response.js → historical/drawdown_response.js} +0 -0
- /package/calculations/behavioural/{gain_response.js → historical/gain_response.js} +0 -0
- /package/calculations/behavioural/{paper_vs_diamond_hands.js → historical/paper_vs_diamond_hands.js} +0 -0
- /package/calculations/behavioural/{position_count_pnl.js → historical/position_count_pnl.js} +0 -0
- /package/calculations/capital_flow/{deposit_withdrawal_percentage.js → historical/deposit_withdrawal_percentage.js} +0 -0
- /package/calculations/capital_flow/{new_allocation_percentage.js → historical/new_allocation_percentage.js} +0 -0
- /package/calculations/capital_flow/{reallocation_increase_percentage.js → historical/reallocation_increase_percentage.js} +0 -0
- /package/calculations/pnl/{profitability_migration.js → historical/profitability_migration.js} +0 -0
- /package/calculations/pnl/{user_profitability_tracker.js → historical/user_profitability_tracker.js} +0 -0
- /package/calculations/speculators/{risk_appetite_change.js → historical/risk_appetite_change.js} +0 -0
- /package/calculations/speculators/{tsl_effectiveness.js → historical/tsl_effectiveness.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const { loadAllPriceData, getDailyPriceChange } = require('
|
|
2
|
-
const { loadInstrumentMappings } = require('
|
|
1
|
+
const { loadAllPriceData, getDailyPriceChange } = require('../../../utils/price_data_provider');
|
|
2
|
+
const { loadInstrumentMappings } = require('../../../utils/sector_mapping_provider');
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @fileoverview Calculates "Net Crowd Flow" for each asset.
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
const { Firestore } = require('@google-cloud/firestore');
|
|
6
6
|
const firestore = new Firestore();
|
|
7
7
|
// CORRECTED PATH: ../utils/ instead of ../../utils/
|
|
8
|
-
const { getInstrumentSectorMap } = require('
|
|
8
|
+
const { getInstrumentSectorMap } = require('../../../utils/sector_mapping_provider');
|
|
9
9
|
|
|
10
10
|
class SmartMoneyFlow {
|
|
11
11
|
// ... (rest of the code is unchanged) ...
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// CORRECTED PATH: ../utils/ instead of ../../utils/
|
|
2
|
-
const { getInstrumentSectorMap } = require('
|
|
2
|
+
const { getInstrumentSectorMap } = require('../../../utils/sector_mapping_provider');
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Aggregates P/L by the number of unique sectors a user is invested in.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Analyzes sector rotation by comparing investment amounts between two days.
|
|
3
3
|
*/
|
|
4
4
|
// CORRECTED PATH: ../utils/ instead of ../../utils/
|
|
5
|
-
const { getInstrumentSectorMap } = require('
|
|
5
|
+
const { getInstrumentSectorMap } = require('../../../utils/sector_mapping_provider');
|
|
6
6
|
|
|
7
7
|
class SectorRotation {
|
|
8
8
|
// ... (rest of the code is unchanged) ...
|
package/calculations/sentiment/{crowd_conviction_score.js → historical/crowd_conviction_score.js}
RENAMED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @fileoverview Calculates a "Crowd Conviction" score for each instrument.
|
|
3
3
|
*/
|
|
4
4
|
// CORRECTED PATH: ../utils/ instead of ../../utils/
|
|
5
|
-
const { loadInstrumentMappings } = require('
|
|
5
|
+
const { loadInstrumentMappings } = require('../../../utils/sector_mapping_provider');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
class CrowdConvictionScore {
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
/package/calculations/behavioural/{paper_vs_diamond_hands.js → historical/paper_vs_diamond_hands.js}
RENAMED
|
File without changes
|
/package/calculations/behavioural/{position_count_pnl.js → historical/position_count_pnl.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/calculations/pnl/{profitability_migration.js → historical/profitability_migration.js}
RENAMED
|
File without changes
|
/package/calculations/pnl/{user_profitability_tracker.js → historical/user_profitability_tracker.js}
RENAMED
|
File without changes
|
/package/calculations/speculators/{risk_appetite_change.js → historical/risk_appetite_change.js}
RENAMED
|
File without changes
|
|
File without changes
|