the numerical simulation of multiscale phenomena , such as fluid flows in porous media and wave propagation in nano - structures , provides effective ways to solve relevant problems in areas such as energy , climate / weather , and health . in this context, the use of finite element methods ( fem ) is particularly disseminated in industry and academia to simulate these phenomena . despite the fact that classical fem methods ( e.g. the galerkin method ) are appropriate for many different problems , their accuracy may seriously decay when they face problems with highly multiscale features . because of that, many modern fem techniques have emerged  . among them , of particular interest to this paper , is the family of multiscale hybrid - mixed ( mhm ) methods originally proposed in  . from a mathematical viewpoint ,the mhm methods naturally incorporate multiple scales ( the mhm - levels ) and provide solutions with high - order precision on coarse meshes . from a computational viewpoint , at a lower mhm - level a set of completely independent _ local _ problemscan be easily computed in parallel to provide information to its upper mhm - level ( the so - called _ global _ problem ) . as a result, the mhm methods are naturally shaped to be used in parallel computing environments . thereby , the mhm methods appear as a highly competitive option to handle realistic multiscale boundary value problems ( bvps ) .the mhm methods have been numerically validated for problems such as the darcy equation  , the stokes / brinkman models , the advective - reactive dominated problems  , and the linear elasticity problem  . in this paper , we present and evaluate two simulator prototypes specifically crafted for the mhm methods , which adopt two different implementation approaches :  a multi - programming language approach with dynamic process scheduling ; and  a single - programming language approach with static process scheduling .  specifically , we use c++ for numerical computation of the global and local problems in a modular way . as for process distribution in the simulator, we employ the erlang concurrent , actor - based language integrated with the c++ modules in the first approach , and a mpi - based c++ application in the second approach .the aim of exploring these different approaches is twofold :  to allow for the deployment of the simulator both in conventional high - performance computing ( hpc ) environments ( with mpi ) and in cloud computing environments ( with erlang ) ; and  to pave the way for further exploration of quality attributes related with software productivity and fault - tolerance , which are key to exascale systems  .we present a preliminary performance evaluation of the two simulator prototypes , taking into account their strong and weak scalability efficiency .we show that , although not as fast as the mpi version , the erlang version does provide fairly good speedups up to a few hundred cores , even with all node and link failover mechanisms being set up .besides , despite the lack of formal evidence , it is worth mentioning erlang s case for software productivity , since it took one of the authors 4 months worth of coding in the erlang part , from learning a whole new , actor - based programming language to implementing a fully - fledged application with all node and link failover mechanisms enabled .the remainder of this paper is structured as follows .section [ sec : mhm ] overviews the family of mhm methods .section [ sec : primitives ] presents the key computing primitives of the mhm simulator and how they relate to the algorithm implied by the mhm methods .section [ sec : impl ] shows the architecture and key design principles that underlie the two different implementations of the simulator .section [ sec : eval ] offers a performance evaluation of these two simulator implementations .finally , section [ sec : conc ] presents some concluding remarks and perspectives for future work .to present the mhm methods in a compact way , we consider the bvp to find , , so that in an open - bounded domain with prescribed homogeneous dirichlet boundary condition on the polygonal boundary . hereafter is a bounded linear operator .some definitions will be needed in the sequel .first , let be a familiy of regular triangulations of such that each mesh decomposes in a set of globally - indexed elements , with .this set defines a _ mesh _ with elements .the label refers to the _ mesh size _ , where is the maximum diameter of any element in the mesh .each element has a boundary consisting of a set of faces , and some of these faces ( those who are internal to the mesh ) may be shared between two elements .denote by the set of , and by the set in the triangulation of all globally - indexed faces , with . defines the _ skeleton _ of a mesh with faces .figure [ fig : mesh ] illustrates these concepts for .we associate each face of to a unitary normal vector , taking care to ensure this is facing outward on .also , the unitary outward normal vector on a face of element is represented by .  .]  second , we define some function spaces :  1 .  is the null space ( with basis ) of operator for all ( e.g. , for the darcy equation is formed by piecewise constants in each  , and then . ) ; 2 . is the orthogonal complement of such that it yields the wellposedness of for all ; 3 . is the space defined as the direct sum between and ( e.g. , for the darcy equation  ) ; 4 . is the space containing the lagrange multipliers defined over  .for these spaces , we also define the inner products and , respectively .third , we define the following finite - dimensional space needed for approximating the exact field :  * is the space of discontinuous polynomial functions on of degree less than or equal to and defined on a uniform partition of , composed of elements ( ) , with basis .  given these definitions , a bvp can be written within the mhm terminology in terms of a collection of local problems each being associated with a different local problem brought together by a global problem defined on .specifically , the global formulation is as follows : find such that for all . is the total number of degrees of freedom ( dofs ) for , and its value depends on the adopted degree of the piecewise polynomials in , the total number of partitions in each face , and the total number of faces in the mesh . in the above formulation, is given ; and are linear bounded operators driven by the local problems .figure [ fig : dofs](a ) illustrates an example of the distribution of the dofs for in the case of the darcy equation and ( with and ) in the mesh of figure [ fig : mesh ] .the local operators and in are responsible for the upscaling process . to precise them , let be a finite - dimensional space ( with basis ) defined within an element in the mesh .at the local level , each element is considered a domain on its own and as such may have an internal triangulation , thus defining a _ submesh _ within .each of these submeshes may have a different characteristic size , depending on the high - contrast aspects of the coefficients involved in operator for each .the number of dofs in will therefore depend on the degree of the polynomial functions in and .for the purposes of this paper , we assume the solution to each local problem is approximated using the continuous galerkin method with a lagrange basis for ( the space of piecewise polynomials of degree less than or equal to ) ; is then determined by the degree of the polynomials and the number of elements in the submesh . as such, we employ the bilinear form to set up operators and .it is defined ( as usual ) as the action of on in , with .figure [ fig : dofs](b ) illustrates an example of with quadratic interpolation for element in the mesh of figure [ fig : mesh ] . in the example, has been internally triangulated generating a submesh with 4 elements .each local problem comprises a set of local _subproblems_. one such subproblem defines by computing in each as follows : find such that   the other subproblems define by computing from the following local problems : for , find such that where changes its sign accordingly to , and is defined by the number of faces in and by the degree of the polynomials and in .finally , from the solution of equations , and , and using that with , the exact field is approximated by .\end{aligned}\ ] ]the mhm simulator is built on top of key computing primitives that bear correspondence with the major mathematical building blocks of the mhm method : splitproblem , solvelocalproblem , reducelocalproblems , and computesolution .these primitives are combined to implement the mhm simulator as depicted abstractly in algorithm [ alg : main ] .   (   the splitproblem primitive divides the original problem posed over a mesh resulting from a triangulation into a global problem ( the 1^st^ mhm - level ) and a set of local problems ( the 2^nd^ mhm - level ) , one for each element in the mesh .this primitive returns a set of pairs , where represents the set of all faces of .the solvelocalproblem computes the contributions and from a specific element in the mesh to be used in the global problem .functions and , are searched as the solution of and , respectively , in the following form : the coefficients and are the actual numerical results computed by the solvelocalproblem primitive through the solution of a set of linear systems of the form and .it is worth noting that these systems share the same matrix {i , j \in \left\{0 , \dots , d_{k_t}-1\right\}} ] in define the solution to in ; likewise , the computed entries {j \in \{0,\dots , n_{v_0}-1\}}$ ] in define the solution in through finally , owing to the computesolution primitive , the two - level numerical solution reads .\ ] ] where we used and in .the mhm simulator is a distributed system . it exploits either erlang s or mpi support for scalable computing and c++ s efficiency for the numerical computations of the global and local problems .the overall architecture of the mhm simulator is depicted in figures [ fig : architecture](a ) and [ fig : architecture](b ) for the erlang and mpi versions , respectively .the following subsections describe the two `` layers '' ( distribution and computation ) of the architecture .    before describing this version of the distribution layer , we give a short introduction to the erlang language and its runtime , including its fault - tolerance mechanisms .  * an erlang prime .* erlang is a concurrent language with functional programming features .it is a language that compiles to an intermediate format ( _ byte codes _ ) and runs in virtual machines ( the erlang _ nodes _ ) . typically , each erlang node runs on a different physical machine .erlang programs are built on functions that can be called from the same process of the calling function or dispatched ( _ spawned _ ) to another process residing in the same or a different erlang node .processes in erlang run concurrently and communicate with each other by message passing .they usually follow a common pattern : once spawned they call a tail - recursive function to process and produce data .this data is referred to as the process _state_. the tail - recursive function usually takes the following sequence of operations :  receive a message from another process ,  handle the message ,  update the process state , and  pass the updated state to a new invocation of the function through its tail - recursive call .finally , a special _ stop _ message is usually defined to allow the receiving process to be terminated gracefully .the erlang runtime provides templates called _ behaviors_that implement the above pattern for processes acting as servers ( the ` gen_server ` behavior ) and finite state machines ( fsms the ` gen_fsm ` behavior ) , among others .building on its messaging mechanism , erlang offers process monitoring capabilities that allow a process to detect whether another process has failed and act accordingly .this is explored in an specific behavior called ` supervisor ` .a supervisor is a process whose main task is to manage spawn , monitor , and eventually re - spawn other processes in case of failure .supervisors may manage any type of erlang process , including other supervisors .this organization creates what is called a _supervision tree_. finally , an erlang _ application _ is a special kind of behavior that allows an entire supervision tree to be started and stopped as a unit . to provide tolerance to hardware faults, an erlang application can be controlled in a distributed manner , by employing two or more erlang nodes running in different machines .this setup configures a _ distributed application_.if the erlang node where a distributed application goes down ( e.g. because of a network partition or machine failure ) , the application can be restarted at another node .  *the simulator distributed application*. figure [ fig : architecture](a ) illustrates the chief processes of the erlang - based simulator distributed application .the _ main supervisor _ implements the ` supervisor ` behavior .it manages a _ master _ , a _regis server _ , and a _ slave supervisor _ , which are all spawned at the application bootstrap .all these processes run in a single erlang node ; if this node becomes unavailable , they are resumed in another erlang node with their state preserved thanks to the use of the mnesia fault - tolerant database embedded in the erlang runtime .this is the first key feature that allows the erlang - based simulator to have a very fine - grained fault tolerance support .the master implements the ` gen_server ` behavior .it keeps track of a set of _ computing tasks _ , which are dynamically scheduled to the available computing resources , as described below .each task is related to either a global or a local problem in the mhm methods , and has an associated state``not solved '' , `` being solved '' , `` being reduced '' ( for global problems only ) or `` solved '' . besides , each task maps onto an instance of the simulator primitives described in section [ sec : primitives ] .these primitives , which are implemented in c++ ( see section [ subsec : cpp ] ) , run on computing resources managed by the regis server , which also implements the ` gen_server ` behavior .the regis server collects status information about the computing resources in the execution platform ( e.g. computing nodes in an hpc cluster or virtual machines in a cloud ) and , for each such resource , asks the slave supervisor ( another implementation of the ` supervisor ` behavior ) to dynamically create / destroy new _slaves _ associated with the resource whenever the resource becomes available / unavailable .this is the second key feature for the fine - grained fault tolerance support in the erlang - based simulator .the slaves implement the ` gen_fsm ` behavior .they run in the same erlang node as the other processes of the erlang application .once started , an slave keeps on asking the master about new computing tasks .the master replies to a request from a slave by :  selecting an appropriate task ,  changing the state of the task to `` being solved''/``being reduced '' , and  replying to the slave with the simulator primitive to be executed .the slave then dispatches the execution of the primitive onto its associated computing resource , and keeps track of the primitive execution .when the slave detects that the primitive is finished , it sends the results of the primitive to the master , which may change the state of the task or create new tasks . if the slave detects that the primitive hasnt completed because of a failure in a computing resource , it notifies the master and the regis server , which dynamically reallocate the task to a different resource .figure [ fig : task_states ] illustrates how the state of the tasks evolves in the simulator .the simulator starts with a single task representing a global problem in algorithm [ alg : main]being published in the master with the `` not solved '' state .at this point a single slave will be able to get this task , which triggers the dispatching of the splitproblem primitive to its associated computing resource and the changing of its state to `` being solved '' .the result of this primitive in algorithm [ alg : main]is taken by the slave as a set of requests one for each the creation of new tasks in the master .each of these new tasks is related to a different local problem and added to the master with the `` not solved '' state . to simplify the illustration , in figure [ fig : task_states ] we only present two local problems being derived from the splitproblem primitive .    from this point on the slaves start to get different tasks related with local problems , changing their states to `` being solved '' and dispatching the execution of the solvelocalproblem primitive to their associated computing resources .we employed the sequential lu factorization implementation of the eigen library within this primitive for solving the linear systems that compute and in equation , with the intention to make as many local problems be solved in parallel in a single computing resource as the amount of cores the resource provides .when these primitive invocations are finished , the slaves send their results in algorithm [ alg : main]to the master , which changes the state of their corresponding tasks to `` solved '' .the slaves then proceed with getting other tasks and dispatching them to their resources until there are no more tasks in the `` not solved '' state .once all local problems are in the `` solved '' state , the next request from an slave is replied with the reducelocalproblems primitive , and the state associated with the global problem is changed from `` being solved '' to `` being reduced '' .again , we employed the lu factorization within this primitive to solve the linear system in equation . for the reducelocalproblemsprimitive , however , we used the shared - memory parallel pardiso solver . the result from the reducelocalproblems primitive triggers the immediate execution of the computesolution primitive and a changing of the task s state to `` solved '' in the master .after that , the simulator finishes .figure [ fig : architecture](b ) illustrates the chief processes of the mpi - based application .the mpi processes that make part of the application are omnipotent ; in contrast with the erlang version , there s no master or slave process . each mpi process is responsible for running its own _ share _ of the splitproblem primitive .this share corresponds to the execution of splitproblem over a partition of .such a partitioning configures a static process scheduling that is kept until the end of the simulation .the result of the splitproblem primitive at each mpi process ( ) is taken by this process as a set of local problems to be solved one for each . from this point on the mpi processes start to execute the solvelocalproblem primitive for all they are responsible for , in the same manner as the erlang version .an mpi barrier is used for making all mpi processes wait for each other as they finish solving all their corresponding local problems . once all local problems are solved, each mpi process is responsible for running its own share of the reducelocalproblems primitive .this is where the mpi version of the mhm simulator mostly differs from the erlang counterpart .a share of the reducelocalproblems primitive corresponds to the distributed assembly of the global linear system shown in equation , and its solution through ldl factorization using the distributed interface of the parallel pastix library  .the result from the reducelocalproblems primitive triggers at each mpi process the immediate execution of its own share of the computesolution primitive .after that , the simulator finishes .  as it can be seen from figure [ fig : architecture](b ) , this implementation is structurally simpler than the one of the erlang - based simulator .most of such simplicity is due to the lack , in this implementation , of a dynamic process scheduling scheme and of any finer - grained fault - tolerance mechanisms .this means that a failure in a single computing resource running an mpi process crashes the whole application .in addition , checkpoints for the fast restart of a crashed application are only available in two points : at the end of the splitproblem primitive , and at the end of all invocations of the solvelocalproblem primitive .therefore , a failure during the solution of a single local problem results in _ all _ local problems being solved again , but if all local problems have been solved , the application can be restarted from the point of the reducelocalproblems primitive .c++ is used for implementing the numerical computations that ultimately solve the global and local problems .the c++ layer is divided into 2 packages .the first package implements key concepts present in any fem - based simulator as c++ classes :  geometric elements ( ` element ` ) and meshes ( ` mesh ` ) ;  quadrature rules for numerical integration ( ` quadrature ` ) ;  spaces of approximate functions ( ` space ` ) ;  basis function definitions for elements ( ` brick ` ) and meshes ( ` block ` ) ;  coefficient and source term definitions ( ` simpledata ` ) ;  contribution computations ( ` localcontribset ` ) ; and  a wrapper to linear solver libraries ( ` linearsolver ` ) .  figure [ fig : uml_basic ] shows a uml diagram with the main relationships between these classes .the ` block ` class is an abstract class ; it must be specialized in classes depending on where the data comes from . the ` galerkinlagrangeblock ` class shown in figure [ fig : uml_basic ] , for instance , compute its values from the definitions of basis functions in ` finiteelementspace ` .the second package comprises a set of c++ classes that implement the framework for mhm methods :  global problem definitions ( ` problem ` ) ;  local problem definitions ( ` localproblem ` and its direct subclasses ` stationarylocalproblem ` and ` transientlocalproblem ` ) ;  definitions of spaces and ( ` mhmspace ` and subclasses of ` localspace ` ) ; and  a subclass of block ( ` mhmblock ` ) .figure [ fig : uml_mhm ] presents a uml diagram that depicts the main relationships between these classes .the ` globalproblem ` class implements the simulator for equation .its methods ` globalproblem::split ( ) ` , ` globalproblem::reduce ( ) ` , and ` globalproblem::solve ( ) ` correspond to the primitives splitproblem , reducelocalproblems , and computesolution in algorithm [ alg : main ] .  `localproblem ` is an abstract class responsible for :  defining a submesh within an element ,  solving a local problem in this submesh , and  computing the local contributions related with this submesh to the global problem .its main method`localproblem::solvelocalproblem()`corresponds to primitive solvelocalproblem in algorithm [ alg : main ] .the subclasses ` stationarylocalproblem ` and ` transientlocalproblem ` specialize the behavior of this method to stationary and transient problems .specializations of these two subclasses then override ` solvelocalproblem ( ) ` to provide concrete behavior .for instance ,the ` diffusionsubproblem ` class specializes ` stationarylocalproblem ` to solve the following local subproblems , which particularize the general equations  and for the darcy equation  : find such that and for , find such that where is the diffusion coefficient .we collected strong and weak scaling performance measurements for the two simulator prototypes .for these measurements , we ran the two prototypes in the santos dumont hpc cluster at lncc in brazil , which has the following per - node configuration : 2x cpu intel xeon e5 - 2695v2 ivy bridge ( 12 cores each cpu ) , 2.4ghz , 64 gb ddr3 ram .the nodes of the cluster are interconnected through an infiniband fdr network with a fat - tree topology , and they share a distributed file system based on lustre v2.1 . the c++ code was compiled with intel s icpc compiler , version 16.0.2 build 20160204 , with the optimization flags ` ' and ` ' enabled .we used eigen version 3.3-rc1 , pastix version 5.2.2.22 , and the pardiso implementation provided with the mkl library that comes with intel s parallel studio xe 2016.2.062 .the erlang code was run with ericsson s open source erlang / otp system , version 17 erts-6.1 , with hipe ( high performance erlang ) native code compilation enabled .the mpi implementation used was the one that also comes with intel s parallel studio xe 2016.2.062 .we solve the darcy equation defined in the unit cube as a model problem .the diffusion coefficient is set as and .as such , the exact solution reads .we setup the mhm simulators with 24 , 192 and 1,536 elements in a global tetrahedral mesh and within each such element a submesh of either 59 or 6,046 tetrahedra dynamically generated by the tetgen library  during runtime , as part of the computation within the solvelocalproblem primitive .we adopted degree and ( 59 tetrahedra case ) or ( 6,046 tetrahedra case ) for the polynomials in , and degree for the polynomials in the submesh .we depict the 192 tetrahedra mesh along with its submeshes ( 59 tetrahedra per element ) in figure [ fig : simulation3d](a ) , and the corresponding numerical solution to our model problem in figure [ fig : simulation3d](b ) .  for the sake of illustrative comparison , we present in table [ tab : galerkin_corr ] the number of dofs that the standard finite element ( galerkin ) method should have to reach a similar approximation order ( in terms of accuracy ) compared to the one using the mhm methods . as shown in  , since we are using and with the mhm methods , the numbers of dofs in the table correspond to the use of the linear space with the galerkin method .we emphasize that , different from what happens within the mhm methodology , the standard approximation using galerkin needs to compute all such dofs at once .this is achieved by solving a single linear system which is typically much larger than those generated by the global and local problems of the mhm methods ..correspondence between mhm parameterization and galerkin dofs for .[ cols= " < , < , < , < " , ]   [ tab : measurements ]  the entries in table [ tab : measurements ] that are in bold and marked with a ` ' can be also used for a weak scalability analysis .we first point out that from the to the configuration , using the erlang version , there was an increase of the time of execution by a factor of , so the weak scalability efficiency was of . as for the mpi version , there was an increase of this time by a factor of , with an efficiency of .we must nevertheless compare these efficiency assessments with 3 different ways to observe the increase in the size of the corresponding problems :  1 .taking the total number of tetrahedra in each configuration : from the to the configuration there is an increase of times the number of tetrahedra ; 2 .taking the correspondence with galerkin dofs for as presented in table [ tab : galerkin_corr ] : from the to the configuration there is an increase of times the number of dofs ; 3 .taking the approximation error in the -norm of the computed solution : from the to the configuration there is a reduction of times the error to the exact solution ( from to ) .  from the numbers above we can verify that the two simulator prototypes scaled well , with a small increase in the time of execution when compared with the large increase in the size of the problems .in this paper we presented our ongoing work on the implementation of scalable simulators specifically crafted for the mhm methods .we presented a preliminary evaluation of our two simulator prototypes , whose results are promising with regard to its scalability . these results also show that erlang s overhead was small in comparison with its benefits in terms of productivity and extensive support for fault tolerance .  for future work, we will be investigating the use of coprocessors ( gpgpus and mics ) to reduce the time taken by the execution of the large amount of solvelocalproblem primitive instances in the simulators .we also intend to experiment with other parallel sparse linear solvers than pastix to solve equation [ eq : mat_global ] in the reducelocalproblems primitive for the case of the mpi version .in particular , the hybrid approaches presented in  combine direct and iterative methods and seem fit to solve linear systems similar to the one illustrated in equation ( [ eq : mat_global ] ) .these research results have received funding from the bull / france , eu h2020 programme and from mcti / rnp - brazil under the hpc4e project , grant agreement n 689772 .the simulations presented herein used the hpc resources provided by lncc s sdumont supercomputer ( http://sdumont.lncc.br ) .e. agullo , l. giraud , a. guermouche , a. haidar , and j. roman .parallel algebraic domain decomposition solver for the solution of augmented systems ., 6061:23 30 , 2013 .civil - comp : parallel , distributed , grid and cloud computing .yalchin efendiev , raytcho lazarov , minam moon , and ke shi .a spectral multiscale hybridizable discontinuous galerkin method for second order elliptic problems ., 292:243 256 , 2015 . special issue on advances in simulations of subsurface flow and transport ( honoring professor mary f. wheeler ) .

Abstract: the family of multiscale hybrid - mixed ( mhm ) finite element methods has received considerable attention from the mathematics and engineering community in the last few years . the mhm methods allow solving highly heterogeneous problems on coarse meshes while providing solutions with high - order precision . it embeds independent local problems which are responsible for upscaling unresolved scales into the numerical solution . these local contributions are brought together through a global problem defined on the skeleton of the coarse partition . since the local problems are completely independent , they can be easily computed in parallel . in this paper , we present two simulator prototypes specifically crafted for the mhm methods , which adopt two different implementation strategies :  a multi - programming language approach , each language tackling different simulation issues ; and  a classical , single - programming language approach .   specifically , we use c++ for numerical computation of the global and local problems in a modular way ; for process distribution in the simulator , we adopt the erlang concurrent language in the first approach , and the mpi standard in the second approach . the aim of exploring these different approaches is twofold :  allow for the deployment of the simulator both in high - performance computing ( with mpi ) and in cloud computing environments ( with erlang ) ; and  pave the way for further exploration of quality attributes related to software productivity and fault - tolerance , which are key to exascale systems .   we present a performance evaluation of the two simulator prototypes taking into account their efficiency .


an ageing population is a major challenge that many countries are facing today .the problem arises from the fact that fertility rates are declining while life expectancy has been increasing in the past several decades without any sign of slowing down .the adverse financial outcome of people living longer than expected , and hence the possibility of outliving their retirement savings , is known as longevity risk .this long term demographic risk has significant implications for societies and manifests as a systematic risk for pension plans and annuity providers .policymakers rely on mortality projection to determine appropriate pension benefits and to understand the costing of different economic assumptions and regulations regarding the age of retirement of a given population .for instance , in the uk and australia defined - benefit pension plans prior to 2000 s had limited exposure to effects of longevity risk since high equity returns on pension fund wealth management portfolios were masking the impact of longevity risk , however post 2000 declining equity returns coupled with record low interest rate financial environments has demonstrated the significance of decades of longevity improvements , posing a very real problem for pension schemes . furthermore , by regulation , insurers who offer retirement income products are required to hold additional reserving capital to cover longevity risk . a key input to address longevity risk is the development of advanced mortality modelling methodology , so that human longevity can be predicted with better accuracy and any uncertainties can be accounted for in mortality forecasting .  since the introduction of the lee - carter model ( ), a range of stochastic mortality models have been proposed in the literature . and introduce multiple period effects and cohort effect to capture the change of mortality with respect to year and year - of - birth , respectively , to the lee - carter model . proposed a two - factor period effect mortality model , known as the cairns - blake - dowd ( cbd ) model , for pensioner ages .a cohort extension of the cbd model was studied in . draws on the strengths of the lee - carter model and the cbd model to produce an age - period - cohort model that includes a term to capture young mortality dynamics . in these well known casesit is common practice in actuarial settings to estimate stochastic mortality models based on a singular value decomposition approach ( , ) or via a maximum likelihood based approach if a discrete poisson regression setting is considered ( , ) .a common feature of the estimation methods adopted in the frameworks mentioned above is that the dynamics of the period effect , the stochastic latent processes , are not directly incorporated into joint parameter and state estimation , and instead form a component of a second stage of estimation .typically this involves specifying a model for the period effect for forecasting purpose only after an estimation is performed .such approaches often suffer from a statistical lack of efficiency compared to methods that perform joint static model parameter estimation and latent process filtering ._ hence , the first argument we make is that recasting different classes of mortality models in a state - space formulation can better facilitate state - space based inference under either frequentist or bayesian estimation .this is especially true in the case that the inference is performed jointly on the latent process and static model parameters , rather than in a less statistically efficient two - stage procedure_.  typically the studies carried out in practice and in the literature have the feature that only mortality data from the past several decades is considered . for many countries ,age - specific death rates are evolving rather smoothly except for some potential change of trend in the last 50 years or so in some developed countries . besides arima models ,structural change model have been proposed to take into account the trend - changing behaviour of the period effect ( , ) . despite this , the implication of including earlier periods that exhibit significant volatility of mortality , which can be attributed to some life - critical events such as wars and epidemics , is still not yet being investigated . the ability to incorporate such structural information into a mortality modelis greatly facilitated when recasting the model in a state - space formulation .furthermore , extensions to mortality models that can also be facilitated in a state - space formulation are increasingly able to be considered and may better explain the stochastic dynamics of such processes .these include features such as : time varying volatility ; cross - sectional volatility between different age groups ; extremal dependence features ; cohort effects ; structure breaks in regimes ; long memory or persistence in mortality features in different age - groups ; cointegration and non - stationarity features ; as well as regression based structures that decompose mortality according to categorical features such as official death causes , regional categories etc .  moreover , additional stochastic factor models such as two and three factor models can be easily considered .this can be particularly relevant when modelling features such as trends in excess mortality in particular age - groups resulting from disease epidemics ( , ) , cold and heat - waves ( , ) and other effects such as medical impairements , occupational hazards , hazardous persuites , geographical location of residence and ethnic origin , see and ._ hence , the second argument we make is that all these different model structures can readily be encoded in state - space model structures .furthermore , they can be consistently combined in joint estimation procedures in such state - space model structures in either frequentist and bayesian formualtions , whilst also admitting consistent joint forecasting models for predictive purposes_.  a variety of state - space model approaches exist in a range of different literatures , in this paper we propose to begin with the widely adopted frameworks typically introduced in state - space modelling settings in or , which we develop to address some of the aforementioned issues .in contrast to the singular value decomposition and poisson regression estimation approaches where the period effect is treated as parameter without any temporal structure in the first - stage estimation , period effect is regarded as a latent process with a markovian structure under the state - space approach . in other words ,a state - space formulation permits modelling , estimation and forecasting of mortality under a unified framework .recent progress in sampling - based techniques has allowed statistical inference to be conducted on sophisticated state - space models that can incorporate multiple latent driving factors which may exhibit non - linear and non - gaussian stochastic dynamics .we take advantage of this development and utilise realistic model to capture the long term volatility structure of mortality time series . and consider bayesian estimation of the lee - carter model in state - space form .a maximum likelihood approach is studied in . here, we extend such frameworks to show how to adopt a combination of filtering procedures with rao - blackwellization to obtain gradient based fisher score equation recursions to accurately and efficiently perform optimal filtering of the latent state process , in the sense of mean square error minimization , and recursive least squares estimation for the static model parameters jointly in a recursive manner .furthermore , we extend such state - space models to incorporate non - linear and non - gaussian features in the state - space structure that no longer admit simple kalman filter forward backward algorithm recursions , leading us to more cutting edge filtering techniques based on sequential monte carlo methods . in this regard , we estimate and examine the lee - carter model with heteroscedasticity using both gradient - based maximum likelihood and bayesian analysis .alternative models that have tried to include such features include , for example , the poisson regression in and , who aimed to replace the homogeneous additive error term in the lee - carter model by a poisson error structure . also we note a recently developed framework for modelling death counts with common latent risk factors via credit risk plus methodology with model estimation via markov chain monte carlo ( mcmc ) in .however , we argue that the state - space formulation allows heteroscedasticity to be accounted for in a more straightforward manner .  through reformulation and extensions of the lee - carter type mortality models in a state - space model structure, we investigate several key properties observed in mortality data .first , the cross sectional variance - covariance matrix between age - group structures is non - homogeneous .second , examination of mortality data over a long period indicates that volatility of the evolution of death rates is not constant , i.e. homoskedascity is present .we show that the incorporation of a second stochastic volatility latent factor will allow us to identify the periods in which mortality demonstrates heightened volatility .this will aid in interpretation and forecasting from such models .specifically , we introduce a stochastic volatility model for the period effect , aiming to capture long term mortality dynamics .the state - space framework provides a natural platform to analyse stochastic volatility models ( , ) . in this paperwe develop a particle markov chain monte carlo ( pmcmc ) ( ) bayesian model formulation in order to estimate the resulting stochastic volatility model of mortality jointly with the other latent stochastic factors and the static model parameters .we introduce to mortality modelling the estimation framework based around the pmcmc algorithm which utilises sequential monte carlo ( smc ) ( , ) to obtain required quantities in metropolis - hastings algorithms that has found many applications in a variety of areas , for example finance ( ) , economics ( ) , non - life insurance ( ) , risk management ( ) and computational biology ( ) .we apply this powerful tool in mortality modelling and it allows us to develop efficient algorithms to estimate a stochastic volatility extension of the lee - carter model .the paper is organised as follows . in section 2we give an overview of the conventional mortality modelling and estimation methodology in the literature .a state - space approach for mortality modelling is formulated and discussed in section 3 .section 4 is devoted to state - space inference for stochastic mortality models in a frequentist approach .section 5 focuses on bayesian inference for dynamic mortality models in state - space framework . in section 6we analyse danish mortality data based on the enhanced models and methodologies proposed in the paper .section 7 provides concluding remarks .in this section we first briefly recall some important definitions on mortality modelling .we then review stochastic mortality models that are commonly found in the literature .standard estimation procedures under frequentist and bayesian approaches are discussed .we use the following standard definitions from actuarial literature on mortality modelling ( , ) .let be a random variable representing the remaining lifetime of a person aged .the cumulative distribution function and survival function of are written as and respectively . for a person aged , the force of mortality at age is defined as let be the density function of ,then from we have . the central death rate for a -year - old , where , is defined as which is a weighted - average of the force of mortality ( here ) .under the so - called piecewise constant force of mortality assumption , that is where and , we have , from , .moreover , if a poisson assumption is made for the actual number of deaths , then the resulting maximum likelihood estimate of the force of mortality ( and hence ) is given by where is the number of deaths recorded at age last birthday and the exposure - to - risk is the average number of people aged last birthday , during the observation year .note that is approximated by an estimate of the population aged last birthday in the middle of the observation year .we refer to as the crude death rate .  in the above setupit is assumed that the force of mortality is deterministic .the stochastic case can be handled by the intensity - based framework where death time is modeled as the first jump time of a doubly stochastic process ( ) .hereafter we treat the force of mortality , the central death rate and the crude death rate as stochastic processes . for a detailed discussion of the background of stochastic mortality modelling in discrete - time and continuous - time ,see .one of the most widely considered examples of stochastic factor model in the context of mortality modelling is the approach first presented in who proposed a stochastic mortality model for the age - specific crude death rate , where and represent age ( or age - group ) and year ( time ) respectively . under the model , the dynamics of the log crude death rates , ,is given by .the distinction of the crude and central death rate is of particular importance when one considers a poisson regression setup of death counts ( discussed in section [ sec : regressionbased ] ) where the dynamics of the central death rate is being modeled ( and ) . ] where denotes a gaussian distribution with zero mean and variance .the vector  ] denotes the trace operator and =   \frac{1}{2}\sum^t_{t=1}\left[\text{tr}\left(\boldsymbol{q}^{-1}_t\frac{\partial   \boldsymbol{q}_t}{\partial \psi_i}\boldsymbol{q}^{-1}_t\frac{\partial \boldsymbol{q}_t}{\partial   \psi_j}\right)\right ] + \text{e}\left[\sum^t_{t=1}\frac{\partial   \boldsymbol{v}^\top_t}{\partial \psi_i}\boldsymbol{q}^{-1}_t\frac{\partial \boldsymbol{v}_t}{\partial   \psi_j}\right ] , \quad i , j=1,\dots , n\ ] ] and the expectation operator  ] given by ; set \right]^{-1}\nabla_{\boldsymbol{\psi}}\,\ell(\bm{\psi}^{(m)}) ] are unbiased marginal likelihoods estimated by smc ( see lemma [ lem : unbiasedmarginal ] ) in the current mcmc iteration and the previous iteration respectively .it can be shown that the invariant distribution of the pimh sampler is the target distribution ( ) .it remains to specify an smc approximation ( appendix [ app : smc ] ) .we use the so - called bootstrap filter , that is , the proposal distribution in the smc algorithm to draw is given by the state equation : consequently , the importance weight is evaluated as where is the incremental importance weight .our approach for sampling from is summarised in algorithm [ pimhalgorithm ] ( together with algorithm [ bootstrapalgorithm ] ) .iteration : obtain an smc approximation via algorithm [ bootstrapalgorithm ] .draw \sim \hat{\pi}_{\boldsymbol{\psi}}(\gamma_{1:t}|\kappa_{0:t}) ] .obtain an smc approximation via algorithm [ bootstrapalgorithm ] .draw and obtain the corresponding marginal likelihood estimate .draw .if },\ ] ] set = \gamma'_{1:t} ] ; otherwise set = \gamma_{1:t}[j-1] ] .obtain  ] denotes a truncated gaussian with support $ ] .it is assumed that the priors for all parameters are independent .samples from the density are obtained by sampling from the following posteriors : } \left(\frac{\sigma^2_\gamma\tilde{\mu}_{\lambda_1}+\tilde{\sigma}^2_{\lambda_1}\sum_t\gamma_{t-1}\gamma_t }     { \sigma^2_\gamma+\tilde{\sigma}^2_{\lambda_1}\sum_t\gamma^2_{t-1 } } ,    \frac{\tilde{\sigma}^2_{\lambda_1}\sigma^2_\gamma}{\sigma^2_\gamma+\tilde{\sigma}^2_{\lambda_1}\sum_t\gamma^2_{t-1}}\right ) , \\\lambda_2|\boldsymbol{y}_{1:t},\boldsymbol{\kappa } , \bm{\gamma } , \boldsymbol{\psi}_{-\lambda_2 } & \sim  \text{n } \left(\frac{\sigma^2_\gamma\tilde{\mu}_{\lambda_2}+\tilde{\sigma}^2_{\lambda_2}\sum_t(\gamma_t-\lambda_1\gamma_{t-1 } ) }     { \sigma^2_\gamma+t\tilde{\sigma}^2_{\lambda_2 } } , \frac{\tilde{\sigma}^2_{\lambda_2}\sigma^2_\gamma}{\sigma^2_\gamma+t\tilde{\sigma}^2_{\lambda_2}}\right ) , \\\gamma_0|\boldsymbol{y}_{1:t},\boldsymbol{\kappa } , \bm{\gamma } , \boldsymbol{\psi}_{-\gamma_0 } & \sim \text{n } \left(\frac{\sigma^2_\gamma\tilde{\mu}_{\gamma_0}+\tilde{\sigma}^2_{\gamma_0}\lambda\gamma_1 }     { \sigma^2_\gamma+\tilde{\sigma}^2_{\gamma_0}\lambda^2 } ,     \frac{\tilde{\sigma}^2_{\gamma_0}\sigma^2_\gamma}{\sigma^2_\gamma+\tilde{\sigma}^2_{\gamma_0}\lambda^2}\right).\end{aligned}\ ] ] where the posterior distributions are obtained similarly as in section [ subsubsec : parapostdistlch ] .in this section a real data empirical study is conducted on danish mortality data using the models summarised in table [ table : modelsummary ] .the lc , lc - h and lcsv models are described in section [ subsec : ssm ] . while the lc - h model addresses heteroscedasticity in the observation equation , the lcsv model attempts to incorporate stochastic volatility in the state dynamics .the lcsv - h model includes both features of the lc - h model and the lcsv model , thus allowing for a full consideration of variability in long term mortality dynamics .the human mortality database provides a particularly long time series of mortality data from year 1835 to 2011 for the danish population , supplemented with a detailed document analysing the data ( ) .the provision of a long time series is important to our analysis concerning stochastic volatility . in the past several decades , mortality trend for developed countriesgenerally exhibit a rather smooth pattern .the inclusion of periods that involve wars , epidemics or other life - critical events are crucial factors in witnessing significant volatility in mortality time series . in the followingwe analyse the population mortality from denmark based on the models in table [ table : modelsummary ] and bayesian methodologies studied in this paper .we then examine the models in terms of the forecasting properties of death rates and life expectancies. we also comment on the linear trend assumption and jump - off bias in mortality forecasting .   the data set consists of danish male population death rates for 21 age groups ( 0 , 1 - 4 , 5 - 9 , , 95 - 99 ) from year 1835 - 2010 where we fix year 2010 as the end year .figure [ fig : timeseriesden ] displays some of the time series of the log death rates for the danish male population .it is clear that the multi - dimensional time series exhibit different volatility for different age groups , which justify the introduction of heteroscedasticity into the observation equation as discussed in section [ sec : lchetero ] .we also observe that , mainly before 1950 , there are periods that the volatility of death rates for some age groups are markedly different .such a change of volatility in the temporal dimension suggests that stochastic volatility may be present in the underlying time preiod effect .     in our empirical studywe focus on bayesian inference and forecasting .we assume vague priors so that all inferences are mainly based on the data and the impact of the prior is not material . taking the lcsv model as an example ,we assume , , , , , , , and , where .the number of iterations of the markov chain is with burn - in .we fix and as an identification constraint .estimated values of the static parameters ( except and ) for the danish mortality data ( 1835 - 2010 ) are shown in table [ table : denstaticpara ] .the rest of the estimated parameters and states are displayed in figure [ fig : denlcsvh18352010 ] .here we only show the plots for the lcsv - h model since the corresponding figures obtained from the lc , lc - h and lcsv model are visually similar to the case of the lcsv - h model .it is evident from figure [ fig : denlcsvh18352010 ] that there are periods , namely 1850 - 1870 , 1910 - 20 , 1930 - 1950 , that the time effect exhibits higher volatility compared with other periods .we also observe that accelerates markedly downward after 1990 and is relatively smooth in the recent period 1950 - 2010 .the filtering of the log - volatility process ( figure [ fig : denlcsvh18352010 ] ) quantifies the volatility level ( ) of the time effect and gives further evidence on the stochastic volatility nature of mortality . to see more clearly the phenomenon of changing volatility, we plot the first difference in figure [ fig : denlcsvh18352010 ] for the lcsv - h model , where denotes the posterior mean of , .it shows evidently the change of volatility level in the latent process .the patterns of the estimated log - volatility and the first difference clearly suggest that it is not appropriate to assume constant volatility ( ) for the time effect .the state - space modelling approach is able to uncover the age - specific heteroscedasticity structure hidden in the danish mortality time series .figure [ fig : denlcsvh18352010 ] reveals that variability is particularly high for the very young and very old age group .implications of the heteroscedastic structure on forecasting will be discussed in section [ sec : forecast ] .  to investigate the forecasting properties of the stochastic volatility model, we also estimate the models based on calibration periods 1835 - 1990 and 1950 - 1990 .figure [ fig : denlcsvh18351990 ] and [ fig : denlcsvh19501990 ] show the estimated parameters and states for the lcsv - h model in those periods .           to compare the fit of the models to the data , we apply deviance information criterion ( dic ) as a bayesian measures of model complexity and fit ( ) .it is common to assess and compare models with latent variables using conditional dic ( , ) .specifically , we use the so - called conditional log - likelihood which is calculated as note that the likelihood is conditional on parameters that include both static parameters and the latent process . using the conditional log - likelihood function ,the deviance is defined as where and we assume since in the models we consider it plays the role of a constant which is the same for competing models .the effective dimension , , is evaluated as where and denote , respectively , the mean of and the mean of the posterior distribution of .the conditional dic is then given by which can be evaluated straightforwardly using mcmc samples .the dic values for the models with different calibration periods are shown in table [ table : dic ] .the inclusion of heteroscedasticity structure has markedly improved the lc and lcsv model . for long calibration period ,the lcsv model has outperformed the lc model .it indicates that the better fit of the lcsv model has more than compensated for its increased complexity . for short calibration period ( 1950 - 1990 ), the lc model performed better than the lcsv model which is expected , since over the short period the evolution of mortality rates is rather smooth and there is no clear advantage in introducing stochastic volatility to the lc model .   in this section, we investigate the forecasting properties of the mortality models summarised in table [ table : modelsummary ] where heteroscedasticity as well as stochastic volatility structures are incorporated .our analysis is based on the forecasting distributions of ( log ) death rates and life expectancy .the bayesian state - space framework allows us to obtain the forecasting distributions using mcmc samples which is shown below .   for the lc ( lc - h ) model ,the -step ahead forecasting distribution of , given , is given by where is the parameter vector for the lc ( lc - h ) model .suggests that we can sample recursively to obtain the forecasting distribution , for , as follows  [ eqn : forecastlcsample ]   where and is the number of mcmc iterations after burn - in . here is a diagonal matrix with on the diagonal for the lc - h model and for the lc model .this procedure generates an estimate of the forecasting distribution .similarly , the forecasting distribution of , given , for the lcsv ( lcsv - h ) model is given by for , the forecasting distribution can be obtained by sampling recursively  [ eqn : forecastlcsvsample ]   where , and is a diagonal matrix with on the diagonal for the lcsv - h model and for the lcsv model .figure [ fig : forecastdeathrates18352010 ] shows the forecasted log death rates based on the lc - h , lcsv and lcsv - h model , using the lc model as a benchmark .we show age groups 5 - 9 , 35 - 39 , 65 - 69 and 95 - 99 as representatives of young , adult , old and very old age .the models are estimated using data for the period 1835 - 2010 and forecast for 30 years .the heteroscedasticity structure , from the lc - h model , gives rise to materially larger forecasting intervals for the young and very old age group , while the forecasting interval for the age group 35 - 39 is narrower than predicted by the lc model .the lcsv model , on the other hand , produces a wider forecasting interval compared to the lc model except for the very old age group .the observed wider forecasting interval is due to the fact that the volatility level is increasing in the last estimation periods and is larger than estimated in the lc model .moreover , as the estimated is close to zero at older ages ( figure [ fig : denlcsvh18352010 ] ) , the impact of the forecasted on the prediction of death rates diminished significantly as older ages are considered . the lcsv - h model exhibits similar features of the lc - h and the lcsv model .it is interesting to note that the forecasted means obtained from the different models are very similar and their differences mainly lie in the forecasting interval .  to illustrate further the forecasting property of the lcsv model, we estimate the models for the period 1835 - 1990 and plot 20-year out - of - sample forecasted log death rates in figure [ fig : forecastdeathrates18351990 ] .it turns out the forecasting intervals predicted by the lcsv model tends to be narrower than the lc model , as the estimated in the lc model is larger than the volatility level at the last estimation period for the lcsv model in this case .note that the forecasted distributions produced by the lc - h model are biased compared to the benchmark lc model since the fitted rates at the last estimation period , that is year 1990 , are different for the lc and lc - h model .this feature is known as jump - off error ( ) .one may remove this jump - off bias by forcing the forecasted death rates to start at the actual rates instead of the fitted rates ( and ) . in this paperwe do not perform this procedure , however .figure [ fig : forecastdeathrates19501990 ] shows the forecasting distributions of log death rates where we assume a shorter calibration period from 1950 to 1990 .for all the models , the estimated for all age groups , except for age groups 0 , 1 - 4 and 5 - 9 , are very close to zero .it is in fact expected since there is no clear downward trend in the observed mortality data besides the first few age groups , during the period 1950 - 1990 .therefore there is only small difference between the forecasting distributions produced by the lc model and the lcsv model , except for young age groups .note that there is a clear change of downward trend for some of the middle age groups for the danish male mortality data as shown in figure [ fig : forecastdeathrates19501990 ] .it results in the out - of - sample data falling out of the lower bound of the credible intervals and its consequence for the forecasting of life expectancy will be discussed in section [ sec : lifeexp ] and generally in section [ sec : lineartrend ] .  by comparing the forecast performance using in - sample data from 1835 - 1990 and from 1950 - 1990 displayed in figure [ fig : forecastdeathrates18351990 ] and [ fig : forecastdeathrates19501990 ] ,we expose the influence that leaving out important historical events , that may affect the mortality rates markedly in a population , can have on the ability to accurately model trend and volatility structures in population dynamics .in particular we observe that one must be cautious as forecast performance can degrade markedly when important historical events are excluded from the sample as the forecast using data from 1835 - 1990 has clearly outperformed the forecast using only shorter calibration data from 1950 - 1990 .                 using the samples of the forecasted log death rates , where and is the number of mcmc samples , we can obtain the so - called period life expectancy at different ages by constructing an abridged life table , since we use age group data , as follows ( , ) .we consider age group \{0 , 1 - 4 , 5 - 9 , , 95 - 99 } and is defined as the initial age of age group , that is .define as the length of the interval of age group ( corresponds to ) and hence we have .we then calculate the ( crude ) death probability that a person aged in year will die in the next years as where is the average fraction of the years lived by the people who is initially aged in that interval . using the assumption that deaths are distributed uniformly in the interval, we set for every . in different period .for ease of comparison we use the typical assumption that . for the special case when age , instead of age group is considered ( that is ), the one - year death probability in year is defined as the ratio of death counts and the population at the beginning of the year . assuming half of the deaths occurred during the first half of the year, then we have where is the population at the middle of the year .the -year death probability for the general case when age group is considered can be derived similarly .] the hypothetical number of people alive at age , , is determined by where is assumed to be .we can then calculate the number of deaths and the person - years lived .the total future lifetime of the persons who attain age is , where . finally , a sample of the period life expectancy at age is obtained as and the distributions are obtained in different forecasting year where .period life expectancy assumes there is no trend for future death rates ( it is evaluated based on the age - specific death rates in a fixed year ) while cohort life expectancy assumes death rates following the lifetime of a cohort and hence it takes mortality trend into account . for example , to evaluate period life expectancy at age in year , one needs while for cohort life expectancy , are used instead .however , the cohort life expectancy for people born in recent years can not be evaluated using data alone since some of the death rates data are yet to be observed . as a resultwe focus on period life expectancy so that our forecasts can be compared with the observed data .figure [ fig : forecastlifeexp18352010 ] shows 30-year forecasted ( period ) life expectancy at birth , age 65 and age 85 for all the models estimated using data from 1835 - 2010 .interestingly , the forecasted life expectancy at birth is similar for the lc and lc - h model .it reflects the fact that forecast intervals of death rates produced by the lc - h model are wider for some age groups and narrower for others , compared to the lc model .these effects tend to cancel each other out as death rates are aggregated for all age groups to form the life expectancy at birth , resulting with a comparable life expectancy at birth distributions .this explanation does not apply to life expectancy at age 65 and 85 , however , since only forecasted death rates for age groups larger than 65 and 85 are used to obtained the corresponding life expectancy distribution . as the forecast intervals of death rates generated by the lc - h model are narrower for old age groups compared with the lc model , the interval for the forecasted life expectancy at age 65 and 85 distribution produced by the lc - h model is observably narrower than the lc model .the higher variability of the forecasted death rates for the lcsv model translates to a wider forecast interval for life expectancy compared to the lc model .similarly to the case of death rates forecasting , the lcsv - h model has both the features of the lc - h and lcsv model in terms of life expectancy prediction .  as we use the fitted death rates instead of the observed death rates in the jump - off year ( that is year 2010 ) ,there is a jump - off bias in the forecasted death rates .the forecasted life expectancy at age 65 is particularly sensitive to this jump off bias .it comes from a sudden decline of death rates for age groups larger than 65 beginning in year 1990 , hence an increase of life expectancy at age 65 is observed .the jump - off bias is significantly smaller when the calibration period 1835 - 1990 is considered , see figure [ fig : forecastlifeexp18351980 ] .as expected , the forecasted distributions of life expectancy at birth and age 65 are similar for all the models estimated using mortality data from year 1950 - 1990 ( figure [ fig : forecastlifeexp19501980 ] ) .note that the credible intervals capture poorly the out - of - sample data in this case except for the life expectancy at age 85 .it is a consequence of the sudden change of significant downward trend for the death rates observed in the middle age groups of the danish mortality data starting from around 1990 , see figure [ fig : forecastdeathrates19501990 ] , as well as the jump - off bias .we discuss about the linear trend assumption and jump - off bias in the next section .in performing the forecasting of death rates and life expectancies , we use the models summarised in table [ table : modelsummary ] where the lc - h , lcsv and lcsv - h models are variants of the lee - carter model in which a linear trend of the period effect is assumed .however , for the danish male mortality data that we used , the overall trend is reasonably linear for the whole period 1835 - 2010 , but the same may not be said for the shorter period 1950 - 2010 as figure [ fig : forecastdeathrates18351990]-[fig : forecastdeathrates19501990 ] indicate .in particular , we observe in figure [ fig : forecastdeathrates19501990 ] that there is a clear change of trend for the death rates of middle age groups .such a change of trend is difficult , if not impossible , to predict in terms of timing and magnitude .we also perform the analysis on french male mortality data and found similar patterns . for forecasting purpose, one may therefore argue that expert opinion will be an important factor in predicting mortality .even though any change of mortality trend in the short run can not be predicted with reasonable accuracy using data alone , it can be _ detected _ if the instantaneous volatility of mortality is quantified .for example , using the lcsv - h model , the log - volatility is quantified and we observe from figure [ fig : denlcsvh18352010 ] that started to increase around 1990 after several decades of declining .the change of volatility level not only affect the prediction intervals as discussed in previous sections , but also indicates that the change of mortality is heightened and one should be cautious whether a change of trend is taking place .we also find that jump - off bias , discussed in section [ sec : deathrates]-[sec : lifeexp ] , is an important factor in predicting deaths rates and life expectancies .we note that it is straight forward to remove the jump - off bias by adjusting - so that the actual death rates , instead of the fitted death rates , are used in the beginning of the forecasting period .we do not provide the corresponding plots in the paper but one can envisage the results simply by shifting the forecasted distribution so that the forecasted mean is attached to the ( in - sample ) data at the end of the estimation year .removing the jump - off bias will have a significant impact on the accuracy of mortality forecasting especially when data exhibit clear trending .we developed and presented a comprehensive state - space framework for stochastic mortality modelling .the state - space approach has two key advantages .first , it puts modelling , estimation and forecasting of mortality in a unified framework in contrast to common practice in this area .second , the methodology permits realistic and sophisticated mortality models to be estimated and forecasted , which could be difficult to handled using other approaches .we show that many of the popular mortality models exist in the literature can be cast in state - space form .we then suggest several classes of mortality models that can be classified as linear gaussian state - space models and non - linear / non - gaussian state - space models .our proposals are not exhaustive but aim to illustrate the flexibility of the methodology .in particular we incorporate heteroscedasticity and stochastic volatility in mortality modelling , as an examination of mortality data suggests that volatility of death rates is not constant in the age and time dimension over a long time period .moreover , we propose an alternative identification constraint for the lee - carter type modelling , which is tailored for the state - space approach .frequestist state - space inference for stochastic mortality models is carried out and explained based on the gradient and hessian of the marginalized likelihood developed recently in statistics literature .we also utilise a modern approach to bayesian inference for state - space modelling hinged on the pmcmc framework .in particular we develop a sampler using a combination of rao - blackwellized kalman filter and particle filter for the latent state process full posterior conditionals , combined with gibbs sampling steps for the static model parameters to estimate a stochastic volatility model for mortality proposed in this paper .  using mortality data of danish male population ,we assess the extended models based on deviance conditional criterion .it is found that incorporating heteroscedasticity is a crucial improvement factor in model fitting , while model complexity is accounted for .the incorporation of stochastic volatility clearly enhances model performance for fitting of long term mortality time series .estimation results for long calibration period support the assumption of stochastic volatility .we show that forecasting can be carried out straightforwardly in state - space framework under a bayeisan setting .we examine the forecasting properties of the models using different calibration periods .the inclusion of heteroscedasticity and stochastic volatility substantially affects prediction intervals of death rate and life expectancy distributions .the linear trend assumption commonly found in mortality modelling and jump - off bias are discussed in light of the danish mortality data .state - space framework provides attractive features that are of importance to mortality modelling .the methods and results developed and shown in the paper will have significant implications for longevity risk management in actuarial applications which is a topic of future research .this research was supported by the csiro - monash superannuation research cluster , a collaboration among csiro , monash university , griffith university , the university of western australia , the university of warwick , and stakeholders of the retirement system in the interest of better outcomes for all .this research was also partially supported under the australian research council s discovery projects funding scheme ( project number : dp160103489 ) .for the lc - h model , the parameter vector is denoted by with dimension where is the number of age group considered . we are required to evaluate , , , and in the gradient - based estimation ( section [ subsec : mle ] ) .define then we have where  and zero otherwise ; is a diagonal matrix with diagonal .note that for , where and .smc , also known as particle filtering , can be viewed as a generalisation of kalman filtering in state - space modelling context .the method is based on importance sampling and it has become an essential sampling - based tool in many domains ( ) . in the following we give a brief review of the method using the lcsv model , - , as an example to derive a basic particle filtering algorithm .our target density is the joint posterior distribution of the states for stochastic volatility : where the parameters of the model are assumed to be known and is suppressed here for ease of notation . to apply importance sampling ,we first calculate the importance density is assumed to satisfy and the importance weight is given by where is called the incremental importance weight .the normalised importance weights are then obtained as . to summarise ,suppose we have particle paths to approximate the density at time .then , from , the -th particle path at time is given by where is sampled from .the target density is approximated by where the normalised weight is obtained from and normalisation is carried out .the problem of degeneracy , that is a majority of the particle paths may have negligible weight , can be handled by resampling .specifically , we define the so - called effective sample size at each time , if is smaller than some threshold ( for example of ) then we draw samples ( denoted by ) from a multinomial distribution with probability weights , , and replace the particle paths by , and set . the resampling step allows to keep the particle paths in proportion to their weights and tend to discard those that have negligible weights .

Abstract: this paper explores and develops alternative statistical representations and estimation approaches for dynamic mortality models . the framework we adopt is to reinterpret popular mortality models such as the lee - carter class of models in a general state - space modelling methodology , which allows modelling , estimation and forecasting of mortality under a unified framework . furthermore , we propose an alternative class of model identification constraints which is more suited to statistical inference in filtering and parameter estimation settings based on maximization of the marginalized likelihood or in bayesian inference . we then develop a novel class of bayesian state - space models which incorporate _ apriori _ beliefs about the mortality model characteristics as well as for more flexible and appropriate assumptions relating to heteroscedasticity that present in observed mortality data . we show that multiple period and cohort effect can be cast under a state - space structure . to study long term mortality dynamics , we introduce stochastic volatility to the period effect . the estimation of the resulting stochastic volatility model of mortality is performed using a recent class of monte carlo procedure specifically designed for state and parameter estimation in bayesian state - space models , known as the class of particle markov chain monte carlo methods . we illustrate the framework we have developed using danish male mortality data , and show that incorporating heteroscedasticity and stochastic volatility markedly improves model fit despite an increase of model complexity . forecasting properties of the enhanced models are examined with long term and short term calibration periods on the reconstruction of life tables .