Skip to content

Commit

Permalink
Distinguish transaction costs for fund selections
Browse files Browse the repository at this point in the history
This supports selections such as the 'kernselectie' of DEGIRO and Saxo's
AutoInvest, with lower transaction fees.
  • Loading branch information
nicwortel committed Aug 1, 2024
1 parent 15176f9 commit ecbb699
Show file tree
Hide file tree
Showing 11 changed files with 372 additions and 24 deletions.
32 changes: 15 additions & 17 deletions data/brokers.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,15 @@
{
"name": "DEGIRO",
"logo": "degiro.png",
"product": "Basic - Kernselectie",
"mutualFundTransactionFee": 0,
"product": "Basic",
"mutualFundTransactionFee": {
"flat": 3.9
},
"etfTransactionFee": {
"flat": 3
},
"selectionMutualFundTransactionFee": 0,
"selectionEtfTransactionFee": {
"flat": 1
},
"costOverview": "https://www.degiro.nl/data/pdf/Tarievenoverzicht.pdf",
Expand All @@ -94,27 +100,19 @@
"maximum": 40
},
"serviceFeeFrequency": "monthly",
"mutualFundTransactionFee": 0,
"mutualFundTransactionFee": {
"percentage": 0.15,
"minimum": 8,
"maximum": 150
},
"etfTransactionFee": {
"percentage": 0.08,
"minimum": 2,
"maximum": 150,
"_comment": "Based on the Bronze account, the fee is lower for accounts with higher equity."
},
"costOverview": "https://www.home.saxo/-/media/documents/regional/nl/pricing-unified.pdf?revision=db393ec4-e48a-4be2-a5e4-7751670cd203",
"website": "https://www.home.saxo/nl-nl"
},
{
"name": "Saxo Bank AutoInvest",
"logo": "saxo.png",
"product": "Zelf Beleggen AutoInvest",
"serviceFee": {
"percentage": 0.01,
"maximum": 40
},
"serviceFeeFrequency": "monthly",
"mutualFundTransactionFee": 0,
"etfTransactionFee": 0,
"selectionMutualFundTransactionFee": 0,
"selectionEtfTransactionFee": 0,
"costOverview": "https://www.home.saxo/-/media/documents/regional/nl/pricing-unified.pdf?revision=db393ec4-e48a-4be2-a5e4-7751670cd203",
"website": "https://www.home.saxo/nl-nl"
},
Expand Down
265 changes: 265 additions & 0 deletions data/fund_selections.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,265 @@
[
{
"broker": "DEGIRO",
"name": "Kernselectie",
"sources": [
"https://www.degiro.nl/tarieven/etf-kernselectie",
"https://www.degiro.nl/data/pdf/DEGIRO_Beleggingsfondsen_Kernselectie.pdf"
],
"isins": [
"IE0008471009",
"IE00B02KXK85",
"IE0005042456",
"IE00B0M62S72",
"IE00B0M62Y33",
"IE00B14X4T88",
"IE00B1FZS350",
"IE00B4K48X80",
"IE00B4L5Y983",
"IE00B4L5YC18",
"NL0009272749",
"FR0007052782",
"IE0032077012",
"LU0252633754",
"DE000A0F5UH1",
"DE000A0H0728",
"FR0010524777",
"IE00B6YX5D40",
"IE00B5M1WJ87",
"NL0009690239",
"IE00B4X9L533",
"IE00B44T3H88",
"NL0010408704",
"IE00B5BMR087",
"IE00B9CQXS71",
"IE00B3RBWM25",
"IE00B3VVMM84",
"IE00B8GKDB10",
"IE00B945VV12",
"IE00B3XXRP09",
"FR0010251744",
"IE00BKM4GZ66",
"IE00BJ38QD84",
"IE00B53SZB19",
"IE00BSKRJZ44",
"IE00BP3QZ825",
"LU0908500753",
"IE00B3WJKG14",
"IE00BZ163M45",
"IE00BM67HT60",
"IE00BYTRRD19",
"NL0011683594",
"IE00B1TXK627",
"IE00B1XNHC34",
"IE00B6R52036",
"IE00B6R51Z18",
"IE00BYZK4552",
"IE00BYZK4776",
"IE00BQQP9F84",
"IE00BQQP9G91",
"IE00BYPLS672",
"IE00BYXG2H39",
"LU1681046931",
"IE00BF0M2Z96",
"IE00BF4RFH31",
"IE00BZCQB185",
"IE00BWBXM948",
"IE00BG0J4C88",
"LU1829218749",
"IE00BGL86Z12",
"IE00BYX2JD69",
"IE00BFXR7892",
"IE00BYWQWR46",
"IE00BK5BQT80",
"IE00BJGWQN72",
"IE00BLRPQH31",
"IE00BMC38736",
"IE00BMYDM794",
"IE000I8KRLL9",
"IE00BLPK3577",
"IE00BMDH1538",
"IE00BMDKNW35",
"IE00BNG8L278",
"IE00BLRB0242",
"IE00B53L4X51",
"NL0006294035",
"NL0006294092",
"LU0523293024",
"LU0837973634",
"LU0837975928",
"LU0837985992",
"LU0837965291",
"LU0837967826",
"LU0837977205",
"LU0837979243",
"LU0482910154",
"LU0293315536",
"LU0972998891",
"LU0348832204",
"LU0839530630",
"LU0823047039",
"LU0496654400",
"LU0252963896",
"LU0827889055",
"LU0252963623",
"LU0252963383",
"LU0376438312",
"LU1005243503",
"LU0823432611",
"IE00B4VRKF23",
"IE00B5MQDC34",
"DE000DWS1VB9",
"DE000DWS1UN6",
"LU0871835996",
"LU0179220412",
"LU0740823785",
"LU0826453069",
"LU0273175025",
"LU0329761406",
"LU0708389589",
"LU0861992385",
"LU0861997004",
"LU0976192475",
"LU0605515880",
"LU0318939252",
"LU0889564604",
"LU0976564798",
"LU0959059279",
"LU0976565506",
"LU0792612466",
"LU0830625769",
"LU0858293193",
"LU0830672258",
"LU0828814094",
"LU0103814108",
"LU0103813043",
"LU0927663491",
"IE00BD616T89",
"IE00B5646799",
"BE6246057333",
"BE6246074502",
"LU0726357444",
"LU0386875149",
"LU0760712090",
"LU0953040879",
"IE0033989843",
"IE00B1JC0H05",
"IE00B2R34Y72",
"IE00B39T3767",
"IE00B62L8426",
"IE0033666466",
"IE00B8DTNZ55",
"IE00B3FNF987",
"IE00B87KCF77",
"LU0620638824",
"LU0792901570",
"LU0177222394",
"LU0966865874",
"LU0969111813",
"LU0562314715",
"LU0201322640",
"GB00B3T70242",
"GB00B3M84Q67",
"GB00B3D8PZ13",
"GB00B1XK5Q40",
"LU0837965457",
"LU0837977544",
"LU0837968121",
"LU0837985646",
"LU0714743050",
"LU0256881474",
"LU0839534970",
"LU0252966055",
"LU0252966485",
"LU0329592371",
"LU0532707519",
"LU0297941469",
"LU0368266812",
"LU0145657366",
"LU0507266574",
"LU0273179522",
"LU0616856778",
"LU0346390270",
"LU0936575868",
"LU0871812789",
"LU0858299471",
"LU0858291221",
"LU0830653209",
"LU0955861553",
"LU0103815170",
"LU0289470972",
"LU0129499017",
"IE00B45R5B91",
"LU0606353232",
"LU0788035094",
"LU0386856941",
"IE00B0C18065",
"IE0032568887",
"IE0002420739",
"IE0032568770",
"IE00B80G9288",
"IE0032379574",
"IE0033591748",
"IE00B3W9BG81",
"IE00B639QZ24",
"IE00B0CNPY59",
"LU0792910563",
"LU0968427160",
"LU0966867227",
"IE00B4ZJ4188",
"LU0145647722",
"FR0010321802",
"FR0010321828",
"IE0002461055",
"IE0002460867",
"LU0995140356",
"NO0008000445",
"NO0008004009",
"NO0010140502",
"LU0212178916",
"LU0171293920",
"LU0876475368",
"LU0983346296",
"LU0860350577",
"LU0860350494",
"LU0885324813",
"LU0860350221",
"LU0860350148",
"LU0860350064",
"LU0929966207",
"LU0828814250",
"LU0892274704",
"LU0892274969",
"LU0976556265",
"LU0995107140",
"LU0828813526",
"LU0942194852",
"LU0892275263",
"LU0212180813",
"LU0823417224",
"LU1165135879",
"LU0252964944",
"LU0329760937",
"LU0992630599",
"LU0827889485",
"LU1829331989",
"IE00BD5HXH43"
]
},
{
"broker": "Saxo Bank",
"name": "AutoInvest",
"sources": [
"https://github.com/nicwortel/indexfondsenvergelijken.nl/issues/51"
],
"isins": [
"IE00B3RBWM25",
"IE00BK5BQT80",
"NL0006311771",
"NL0011309349",
"NL0014332587",
"IE00B4L5Y983",
"IE00BKM4GZ66"
]
}
]
8 changes: 4 additions & 4 deletions data/portfolios.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"ING",
"ABN Amro",
"DEGIRO",
"Saxo Bank AutoInvest",
"Saxo Bank",
"Interactive Brokers",
"Lynx",
"Easybroker"
Expand All @@ -65,7 +65,7 @@
"DEGIRO",
"Interactive Brokers",
"Lynx",
"Saxo Bank AutoInvest",
"Saxo Bank",
"Easybroker"
]
},
Expand All @@ -92,7 +92,7 @@
}
],
"brokers": [
"Saxo Bank AutoInvest",
"Saxo Bank",
"Interactive Brokers",
"Lynx",
"Easybroker",
Expand All @@ -112,7 +112,7 @@
}
],
"brokers": [
"Saxo Bank AutoInvest",
"Saxo Bank",
"Interactive Brokers",
"Lynx",
"Easybroker"
Expand Down
14 changes: 14 additions & 0 deletions src/Broker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {MutualFund} from "./Fund/MutualFund";
import {DeductibleFee} from "./Pricing/DeductibleFee";
import {Fee} from "./Pricing/Fee";
import {Transaction} from "./Transaction";
import {FundSelection} from "./FundSelection";

export class Broker {
constructor(
Expand All @@ -15,6 +16,9 @@ export class Broker {
public serviceFeeCalculation: 'averageEndOfMonth' | 'averageOfQuarter' | 'endOfQuarter',
public mutualFundTransactionFee: Fee,
public etfTransactionFee: Fee,
public selectionMutualFundTransactionFee: Fee,
public selectionEtfTransactionFee: Fee,
public fundSelections: FundSelection[],
public dividendDistributionFee: Fee,
public costOverview: string,
public logo?: string,
Expand Down Expand Up @@ -63,6 +67,16 @@ export class Broker {
}

private getTransactionFeeFor(fund: Fund): Fee {
if (this.fundSelections.some((selection) => selection.contains(fund))) {
if (fund instanceof MutualFund) {
return this.selectionMutualFundTransactionFee;
}

if (fund instanceof Etf) {
return this.selectionEtfTransactionFee;
}
}

if (fund instanceof MutualFund) {
return this.mutualFundTransactionFee;
}
Expand Down
Loading

0 comments on commit ecbb699

Please sign in to comment.