|
|
|
@ -161,7 +161,10 @@ export class BenchmarkService {
|
|
|
|
performances: {
|
|
|
|
performances: {
|
|
|
|
allTimeHigh: {
|
|
|
|
allTimeHigh: {
|
|
|
|
date: allTimeHigh?.date,
|
|
|
|
date: allTimeHigh?.date,
|
|
|
|
performancePercent: performancePercentFromAllTimeHigh
|
|
|
|
performancePercent:
|
|
|
|
|
|
|
|
performancePercentFromAllTimeHigh >= 0
|
|
|
|
|
|
|
|
? 0
|
|
|
|
|
|
|
|
: performancePercentFromAllTimeHigh
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
symbol: benchmarkAssetProfiles[index].symbol,
|
|
|
|
symbol: benchmarkAssetProfiles[index].symbol,
|
|
|
|
@ -419,7 +422,7 @@ export class BenchmarkService {
|
|
|
|
private getMarketCondition(
|
|
|
|
private getMarketCondition(
|
|
|
|
aPerformanceInPercent: number
|
|
|
|
aPerformanceInPercent: number
|
|
|
|
): Benchmark['marketCondition'] {
|
|
|
|
): Benchmark['marketCondition'] {
|
|
|
|
if (aPerformanceInPercent === 0) {
|
|
|
|
if (aPerformanceInPercent >= 0) {
|
|
|
|
return 'ALL_TIME_HIGH';
|
|
|
|
return 'ALL_TIME_HIGH';
|
|
|
|
} else if (aPerformanceInPercent <= -0.2) {
|
|
|
|
} else if (aPerformanceInPercent <= -0.2) {
|
|
|
|
return 'BEAR_MARKET';
|
|
|
|
return 'BEAR_MARKET';
|
|
|
|
|