Browse Source

Fix portfolio calculation for holdings with activities before first known historical market price

pull/7761/head
Thomas Kaul 2 months ago
parent
commit
e39b3e0689
  1. 2
      apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-btcusd-buy-before-first-market-price.spec.ts
  2. 2
      apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-manual-buy-before-first-market-price.spec.ts

2
apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-btcusd-buy-before-first-market-price.spec.ts

@ -80,7 +80,7 @@ describe('PortfolioCalculator', () => {
}); });
describe('get current positions', () => { describe('get current positions', () => {
it.only('with BTCUSD buy before the first known market price', async () => { it('with BTCUSD buy before the first known market price', async () => {
jest.useFakeTimers().setSystemTime(parseDate('2022-01-14').getTime()); jest.useFakeTimers().setSystemTime(parseDate('2022-01-14').getTime());
const activities: Activity[] = [ const activities: Activity[] = [

2
apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-manual-buy-before-first-market-price.spec.ts

@ -80,7 +80,7 @@ describe('PortfolioCalculator', () => {
}); });
describe('get current positions', () => { describe('get current positions', () => {
it.only('with MANUAL buy before the first known market price', async () => { it('with MANUAL buy before the first known market price', async () => {
jest.useFakeTimers().setSystemTime(parseDate('2022-01-31').getTime()); jest.useFakeTimers().setSystemTime(parseDate('2022-01-31').getTime());
const activities: Activity[] = [ const activities: Activity[] = [

Loading…
Cancel
Save