Contributing to DSGE.jl

Contributing to DSGE.jl

Notes for DSGE.jl Contributors

We are continuing to add more features to this package. Please see the README for details.

As these steps are under development, we would welcome improvements to the existing code from the community. Some examples could be:

Git Recommendations For Pull Requests

These are adapted from JuliaLang.

DSGE Julia Style Guide

Intro

This document lists Julia coding recommendations consistent with best practices in the software development community. The recommendations are based on guidelines for other languages collected from a number of sources and on personal experience. These guidelines are written with the New York Fed DSGE code in mind. All pull requests submitted should follow these general style guidelines.

Naming conventions

Emphasize readability! Our goal is for the code to mimic the mathematical notation used in New York Fed DSGE papers as closely as possible.

use. Variables with a large scope should have especially meaningful names. Variables with a small scope can have short names.

Variable names should be in lower case, using underscores to separate parts of a compound variable name. For example, steady_state and equilibrium_conditions are two fields in the Model990() object that follow this convention. Also notice that, though the words could be shortened, they are spelled out for maximum clarity.

number of objects (e.g. n_parameters or n_anticipated_shocks) use the suffix s as is natural in spoken language.

when such a name is used in conjunction with the logical negation operator as this results in a double negative. It is not immediately apparent what !isNotFound means. Use isFound. Avoid isNotFound.

MAX_ITERATIONS

Variables with mathematical significance should use unicode characters and imitate LaTeX syntax. For example, ρ should be used to name the autocorrelation coefficient in an AR(1) process, and σ should be used to name standard deviation. Parameters in the text should keep the same symbol in the code (e.g. α in the code is the same α as in this paper, and takes on it usual significance as the capital share in a Cobb-Douglas output function.

Code Formatting Guidelines