The metafolio R package is a tool to simulate salmon metapopulations and apply financial portfolio optimization concepts. The package accompanies the paper 'Portfolio conservation of metapopulations under climate change'. See citation("metafolio").