Read the following texts and table with financial data from an S&P 500 earnings report carefully.Based on the question-answer history (if provided), answer the last question. The answer may require mathematical calculation based on the data provided.

Text: management 2019s discussion and analysis 78 jpmorgan chase & co./2018 form 10-k treasury and cio overview treasury and cio is predominantly responsible for measuring , monitoring , reporting and managing the firm 2019s liquidity , funding , capital , structural interest rate and foreign exchange risks . the risks managed by treasury and cio arise from the activities undertaken by the firm 2019s four major reportable business segments to serve their respective client bases , which generate both on- and off- balance sheet assets and liabilities . treasury and cio seek to achieve the firm 2019s asset-liability management objectives generally by investing in high- quality securities that are managed for the longer-term as part of the firm 2019s investment securities portfolio . treasury and cio also use derivatives to meet the firm 2019s asset- liability management objectives . for further information on derivatives , refer to note 5 . in addition , treasury and cio manage the firm 2019s cash position primarily through depositing at central banks and investing in short-term instruments . for further information on liquidity and funding risk , refer to liquidity risk management on pages 95 2013100 . for information on interest rate , foreign exchange and other risks , refer to market risk management on pages 124 2013131 . the investment securities portfolio primarily consists of agency and nonagency mortgage-backed securities , u.s . and non-u.s . government securities , obligations of u.s . states and municipalities , other abs and corporate debt securities . at december 31 , 2018 , the investment securities portfolio was $ 260.1 billion , and the average credit rating of the securities comprising the portfolio was aa+ ( based upon external ratings where available and , where not available , based primarily upon internal ratings that correspond to ratings as defined by s&p and moody 2019s ) . refer to note 10 for further information on the firm 2019s investment securities portfolio . selected income statement and balance sheet data as of or for the year ended december 31 , ( in millions ) 2018 2017 2016 investment securities gains/ ( losses ) $ ( 395 ) $ ( 78 ) $ 132 available-for-sale ( 201cafs 201d ) investment securities ( average ) 203449 219345 226892 held-to-maturity ( 201chtm 201d ) investment securities ( average ) 31747 47927 51358 investment securities portfolio ( average ) 235197 267272 278250 afs investment securities ( period-end ) 228681 200247 236670 htm investment securities ( period-end ) 31434 47733 50168 investment securities portfolio ( period 2013end ) 260115 247980 286838 as permitted by the new hedge accounting guidance , the firm elected to transfer certain investment securities from htm to afs in the first quarter of 2018 . for additional information , refer to notes 1 and 10. . <table class='wikitable'><tr><td>1</td><td>as of or for the year ended december 31 ( in millions )</td><td>2018</td><td>2017</td><td>2016</td></tr><tr><td>2</td><td>investment securities gains/ ( losses )</td><td>$ -395 ( 395 )</td><td>$ -78 ( 78 )</td><td>$ 132</td></tr><tr><td>3</td><td>available-for-sale ( 201cafs 201d ) investment securities ( average )</td><td>203449</td><td>219345</td><td>226892</td></tr><tr><td>4</td><td>held-to-maturity ( 201chtm 201d ) investment securities ( average )</td><td>31747</td><td>47927</td><td>51358</td></tr><tr><td>5</td><td>investment securities portfolio ( average )</td><td>235197</td><td>267272</td><td>278250</td></tr><tr><td>6</td><td>afs investment securities ( period-end )</td><td>228681</td><td>200247</td><td>236670</td></tr><tr><td>7</td><td>htm investment securities ( period-end )</td><td>31434</td><td>47733</td><td>50168</td></tr><tr><td>8</td><td>investment securities portfolio ( period 2013end )</td><td>260115</td><td>247980</td><td>286838</td></tr></table> management 2019s discussion and analysis 78 jpmorgan chase & co./2018 form 10-k treasury and cio overview treasury and cio is predominantly responsible for measuring , monitoring , reporting and managing the firm 2019s liquidity , funding , capital , structural interest rate and foreign exchange risks . the risks managed by treasury and cio arise from the activities undertaken by the firm 2019s four major reportable business segments to serve their respective client bases , which generate both on- and off- balance sheet assets and liabilities . treasury and cio seek to achieve the firm 2019s asset-liability management objectives generally by investing in high- quality securities that are managed for the longer-term as part of the firm 2019s investment securities portfolio . treasury and cio also use derivatives to meet the firm 2019s asset- liability management objectives . for further information on derivatives , refer to note 5 . in addition , treasury and cio manage the firm 2019s cash position primarily through depositing at central banks and investing in short-term instruments . for further information on liquidity and funding risk , refer to liquidity risk management on pages 95 2013100 . for information on interest rate , foreign exchange and other risks , refer to market risk management on pages 124 2013131 . the investment securities portfolio primarily consists of agency and nonagency mortgage-backed securities , u.s . and non-u.s . government securities , obligations of u.s . states and municipalities , other abs and corporate debt securities . at december 31 , 2018 , the investment securities portfolio was $ 260.1 billion , and the average credit rating of the securities comprising the portfolio was aa+ ( based upon external ratings where available and , where not available , based primarily upon internal ratings that correspond to ratings as defined by s&p and moody 2019s ) . refer to note 10 for further information on the firm 2019s investment securities portfolio . selected income statement and balance sheet data as of or for the year ended december 31 , ( in millions ) 2018 2017 2016 investment securities gains/ ( losses ) $ ( 395 ) $ ( 78 ) $ 132 available-for-sale ( 201cafs 201d ) investment securities ( average ) 203449 219345 226892 held-to-maturity ( 201chtm 201d ) investment securities ( average ) 31747 47927 51358 investment securities portfolio ( average ) 235197 267272 278250 afs investment securities ( period-end ) 228681 200247 236670 htm investment securities ( period-end ) 31434 47733 50168 investment securities portfolio ( period 2013end ) 260115 247980 286838 as permitted by the new hedge accounting guidance , the firm elected to transfer certain investment securities from htm to afs in the first quarter of 2018 . for additional information , refer to notes 1 and 10. .
Question: what was the amount of the afs investment securities in 2018?
Answer: 228681.0
Question: and what was it in 2017?

user
200247.0
assistant