.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "generated_examples\ifrs17sim\plot_ifrs_waterfall.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_generated_examples_ifrs17sim_plot_ifrs_waterfall.py: IFRS waterfall chart ===================================== The script draws multiple waterfall charts, each of which depict sources of changes in balances related to IFRS17. The script is broken down into pieces of code, and explained in a Jupyter notebook, :doc:`/projects/ifrs17sim_charts_baseline`. The live version of the notebook is available online. *Launch this notebook online!* |binder ifrs17sim_charts_baseline| .. include:: /binderlinks.rst :start-after: Begin binder ifrs17sim_charts_baseline :end-before: End binder ifrs17sim_charts_baseline .. seealso:: * The :mod:`~ifrs17sim` library .. GENERATED FROM PYTHON SOURCE LINES 22-88 .. rst-class:: sphx-glr-horizontal * .. image-sg:: /generated_examples/ifrs17sim/images/sphx_glr_plot_ifrs_waterfall_001.png :alt: CSM Amortization :srcset: /generated_examples/ifrs17sim/images/sphx_glr_plot_ifrs_waterfall_001.png :class: sphx-glr-multi-img * .. image-sg:: /generated_examples/ifrs17sim/images/sphx_glr_plot_ifrs_waterfall_002.png :alt: Expected Cashflows :srcset: /generated_examples/ifrs17sim/images/sphx_glr_plot_ifrs_waterfall_002.png :class: sphx-glr-multi-img * .. image-sg:: /generated_examples/ifrs17sim/images/sphx_glr_plot_ifrs_waterfall_003.png :alt: Actual Cashflows :srcset: /generated_examples/ifrs17sim/images/sphx_glr_plot_ifrs_waterfall_003.png :class: sphx-glr-multi-img * .. image-sg:: /generated_examples/ifrs17sim/images/sphx_glr_plot_ifrs_waterfall_004.png :alt: IFRS17 Profit/Loss :srcset: /generated_examples/ifrs17sim/images/sphx_glr_plot_ifrs_waterfall_004.png :class: sphx-glr-multi-img .. code-block:: default from draw_charts import draw_waterfall, get_waterfalldata import modelx as mx import seaborn as sns sns.set_theme(style="darkgrid") model = mx.read_model("model") proj = model.OuterProj[1] # CSM Amortization csmrf = get_waterfalldata( proj, items=['CSM', 'IntAccrCSM', 'AdjCSM_FlufCF', 'TransServices'], length=3, reverseitems=['TransServices']) draw_waterfall(csmrf, title='CSM Amortization') # Expected Cashflow Rollforwad estcf = get_waterfalldata( proj, items=['PV_FutureCF', 'EstPremIncome', 'EstIntOnCF', 'EstAcqCashflow', 'EstClaim', 'EstExps'], length=3, reverseitems=['EstPremIncome']) draw_waterfall(estcf, title='Expected Cashflows') # Actual Cashflow Rollforward actcf = get_waterfalldata( proj, items=['PremIncome', 'IntAccumCF', 'ExpsAcqTotal', 'BenefitTotal', 'ExpsMaintTotal', 'ActualNetCF'], length=3, reverseitems=['ExpsAcqTotal', 'BenefitTotal', 'ExpsMaintTotal']) draw_waterfall(actcf, stocks=[0, 5], title='Actual Cashflows') # IFRS17 Financial Performance ifrspl = get_waterfalldata( proj, items=['InsurRevenue', 'InsurServiceExps', 'InsurFinIncomeExps', 'ProfitBefTax'], length=5, reverseitems=['InsurServiceExps']) draw_waterfall(ifrspl, stocks=[0, 3], title='IFRS17 Profit/Loss') .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 1.267 seconds) .. _sphx_glr_download_generated_examples_ifrs17sim_plot_ifrs_waterfall.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_ifrs_waterfall.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_ifrs_waterfall.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_