Woelige economische tijden en lage rendementen op spaarboekjes zijn voor heel wat mensen het signaal om zich wat te verdiepen in de werking van de beurs.

image description

Opgave

Programmeer de volgende twee functies:

Handige string-functies: .upper(), .lower(), .replace(oud, nieuw)

Voorbeelden

>>> slechte_beursdagen([100.78, 98.34, 101.12, 102.65, 99.8, 97.12, 103.64, 102.71])
[1, 4, 5, 7]

>>> slechte_beursdagen([98.34, 100.78, 101.12, 102.65])
[]

beleggingsproducten = ["Shares Core SP 500 UCITS ETF USD (Acc)",
                        "iShares Core MSCI World UCITS ETF USD (Acc)",
                        "Vanguard SP 500 UCITS ETF (USD) (Dist)",
                        "iShares Core SP 500 UCITS ETF USD (Dist)",
                        "Vanguard FTSE All-World UCITS ETF (USD) (Dist)",
                        "iShares MSCI ACWI UCITS ETF USD (Acc)",
                        "Lyxor World Water UCITS ETF Dist",
                        "iShares High Yield Corp Bond UCITS ETF EUR (Dist)",
                        "Vanguard LifeStrategy 80 Equity UCITS ETF (EUR) (Acc)",
                        "Vanguard LifeStrategy 40 Equity UCITS ETF (EUR) (Dist)"]

>>> filter(belegginsproducten, 'Lyxor')
['LYXOR world water ucits etf dist']

>>> filter(belegginsproducten, 'EQUITY')
['vanguard lifestrategy 80 EQUITY ucits etf (eur) (acc)', 'vanguard lifestrategy 40 EQUITY ucits etf (eur) (dist)']

>>> filter(belegginsproducten, 'rich')
[]