API Reference

WORKSPACE

Note

Below, Database represents either:

  • Comments

  • Equations

  • Identities

  • Lists

  • Scalars

  • Tables

  • Variables

Database.names

names: List[str]

Database.filename

filename: str

Database.description

description: str

Database.load(self, filepath)

Load objects stored in file 'filepath' into the current database.

Database.save(self, filepath)

Save objects of the current database into the file 'filepath'.

Database.clear(self)

Delete all objects from the current database.

Database.is_subset(self)

Whether or not the present object represents a subset of a global IODE database.

Database.is_copy_subset(self)

Whether or not the present object represents of a subset of a global IODE database and if the IODE objects of the subset represent deep copies of the IODE objects from the global IODE database.

Database.copy(self)

Create a copy of an IODE database.

Database.get_names(self[, pattern])

Returns the list of objects names given a pattern.

Database.rename(self, old_name, new_name)

Rename an object of the database.

Database.__len__

Return the number of IODE objects in the current database.

Database.__contains__

Test if the IODE object named item is present in the current database.

Database.__iter__

Iterate over object names.

Database.__getitem__

Return the (subset of) IODE object(s) referenced by key.

Database.__setitem__

Update/add a (subset of) IODE object(s) referenced by key from/to the current database.

Database.__delitem__

Remove the (subset of) IODE object(s) referenced by key from the current database.

Database.search(self, pattern[, word, ...])

Return a list of all objects from the current database having a specific pattern in their names or LEC expression, comment...

Database.copy_from(self, input_files[, ...])

Copy (a subset of) objects from the input file(s) 'input_files' into the current database.

Database.merge(self, other[, overwrite])

Database.merge_from(self, input_file)

Merge all objects stored in the input file 'input_file' into the current database.

Comments

Comments

IODE Comments database.

Comments.series

series: Series

Comments.from_series(self, s)

Copy the pandas Series s into the IODE Comments database.

Comments.to_series(self)

Create a pandas Series from the current Comments database.

Equations

Equations

IODE Equations database.

Equations.df

df: DataFrame

Equations.estimate(self[, from_period, ...])

Estimate an equation or a block of equations.

Equations.from_frame(self, df)

Copy the pandas DataFrame df into the IODE Equations database.

Equations.to_frame(self)

Create a pandas DataFrame from the current Equations database.

Identities

Identities

IODE Identities database.

Identities.series

series: Series

Identities.execute(self[, identities, ...])

Execute the specified identity(ies).

Identities.from_series(self, s)

Copy the pandas Series s into the IODE Identities database.

Identities.to_series(self)

Create a pandas Series from the current Identities database.

Lists

Lists

IODE Lists database.

Lists.series

series: Series

Lists.from_series(self, s)

Copy the pandas Series s into the IODE Lists database.

Lists.to_series(self)

Create a pandas Series from the current Lists database.

Scalars

Scalars

IODE Scalars database.

Scalars.df

df: DataFrame

Scalars.from_series(self, s)

Copy the pandas Series s into the IODE Scalars database.

Scalars.from_frame(self, df)

Copy the pandas DataFrame df into the IODE Scalars database.

Scalars.to_frame(self)

Create a pandas DataFrame from the current Scalars database.

Tables

Tables

IODE Tables database.

Variables

Variables

IODE Variables database.

Variables.mode

mode: str

Variables.sample

sample: Sample

Variables.nb_periods

nb_periods: int

Variables.periods

periods: List[str]

Variables.periods_as_float

periods_as_float: List[float]

Variables.df

df: DataFrame

Variables.periods_subset(self[, ...])

Return a subset of the periods from the current Variables sample.

Variables.low_to_high(self, type_of_series, ...)

Build series with higher periodicity for stock data (Unemployment, Debt, ...) or flow data (GNP, Deficit, ...).

Variables.high_to_low(self, type_of_series, ...)

Build series of lower periodicity by (summing the / taking the average of the / taking the last observation of) sub-periods.

Variables.extrapolate(self, method[, ...])

Extrapolate variables using one the method described below, based on previous periods.

Variables.seasonal_adjustment(self, input_file)

Eliminate seasonal variations in monthly series (= variables).

Variables.trend_correction(self, input_file, ...)

Implementation of the Hodrick-Prescott method for trend series (= variables) construction.

Variables.from_frame(self, df)

Copy the pandas DataFrame df into the IODE Variables database.

Variables.to_frame(self[, vars_axis_name, ...])

Create a pandas DataFrame from the current Variables database.

Variables.from_array(self, array[, ...])

Copies the Array array into the IODE Variables database.

Variables.to_array(self[, vars_axis_name, ...])

Creates an Array from the current IODE Variables database.

IODE OBJECTS

EQUATION

Equation

IODE equation.

Equation.endogenous

endogenous: str

Equation.lec

lec: str

Equation.sample

sample: Sample

Equation.method

method: str

Equation.comment

comment: str

Equation.block

block: str

Equation.instruments

instruments: Union[str, List[str]]

Equation.tests

tests: Dict[str, float]

Equation.coefficients

coefficients: List[str]

Equation.variables

variables: List[str]

Equation.get_formated_date(self[, format])

Return the date of last estimation in a given format.

Equation.split_equation(self)

Split an equation into its left-hand side and its right-hand side.

Equation.estimate(self[, from_period, to_period])

Estimate the present equation.

LIST

split_list(list_txt)

Split an IODE list written as a string and return a Python list.

SCALAR

Scalar

IODE Scalars are dimensionless variables defined by a single value.

Scalar.value

value: float

Scalar.relax

relax: float

Scalar.std

std: float

TABLE

Table

IODE tables are objects designed to present variables and scalars (results or data) in the form of tables of figures or graphs.

Table.nb_lines

nb_lines: int

Table.nb_columns

nb_columns: int

Table.language

language: str

Table.ymin

ymin: float

Table.ymax

ymax: float

Table.gridx

gridx: str

Table.gridy

gridy: str

Table.graph_axis

graph_axis: str

Table.graph_alignment

graph_alignment: str

Table.box

box: bool

Table.shadow

shadow: bool

Table.compute(self, generalized_sample[, ...])

Compute the values corresponding to LEC expressions in cells.

Table.index(self, key)

Return the index of the line containing the string key.

Table.insert(self, index, value)

Insert a new line in the table.

Table.__len__

Number of lines of the table.

Table.__getitem__

Get a line of the table.

Table.__setitem__

Update a line of the table.

Table.__delitem__

Delete the line at the given index

Table.__iadd__

Append a new line to the table.

TableLine

IODE Table line.

TableLine.axis_left

axis_left: bool

TableLine.graph_type

graph_type: str

TableLine.line_type

line_type: str

TableCell

IODE Table cell.

TableCell.cell_type

cell_type: str

TableCell.align

align: str

TableCell.bold

bold: bool

TableCell.italic

italic: bool

TableCell.underline

underline: bool

TableCell.variables

variables: List[str]

COMPUTED TABLE

ComputedTable

Object returned by the method compute().

ComputedTable.nb_decimals

nb_decimals: int

ComputedTable.nb_lines

nb_lines: int

ComputedTable.lines

lines: List[str]

ComputedTable.nb_columns

nb_columns: int

ComputedTable.columns

columns: List[str]

ComputedTable.nb_files

nb_files: int

ComputedTable.files

files: List[str]

ComputedTable.nb_operations_between_files

nb_operations_between_files: int

ComputedTable.sample

sample: Sample

ComputedTable.nb_periods

nb_periods: int

ComputedTable.title

title: str

ComputedTable.is_editable(self, row, column)

Check if a cell in the computed table is editable.

ComputedTable.to_array(self)

Convert the computed table to a larray Array.

ComputedTable.to_frame(self)

Convert the computed table to a pandas DataFrame.

ComputedTable.__getitem__

Get the value of a cell of the computed table.

ComputedTable.__setitem__

Assign a new value to a cell.

TIME

Period

Period.year

year: int

Period.periodicity

periodicity: str

Period.step

step: int

Period.difference(self, other)

Number of sub periods between two periods.

Period.nb_periods_per_year(self)

Number of periods in a year according to the periodicity.

Period.shift(self, nb_periods)

Shift the current period by a number of sub periods.

Period.to_float(self)

Returns a numerical representation of the period.

Sample

A sample represents the series of sub periods attached to the IODE variables or to the estimation process.

Sample.start

start: Period

Sample.end

end: Period

Sample.nb_periods

nb_periods: int

Sample.index(self, period)

Position of the 'period' in the sample.

Sample.get_period_list(self[, astype])

List of all periods of the sample.

Sample.intersection(self, other_sample)

Compute the intersection between two samples.

ESTIMATION

Equations.estimate(self[, from_period, ...])

Estimate an equation or a block of equations.

dynamic_adjustment(method, eqs[, c1, c2])

Transform a LEC equation to add a dynamic adjustment.

dickey_fuller_test(lec, drift, trend, order)

Dickey-Fuller tests.

SIMULATION

Simulation

Class for simulate models.

Simulation.convergence_threshold

convergence_threshold: float

Simulation.relax

relax: float

Simulation.sort_algorithm

sort_algorithm: str

Simulation.initialization_method

initialization_method: str

Simulation.max_nb_iterations

max_nb_iterations: int

Simulation.max_nb_iterations_newton

max_nb_iterations_newton: int

Simulation.nb_passes

nb_passes: int

Simulation.debug

debug: bool

Simulation.debug_newton

debug_newton: bool

Simulation.model_exchange(self[, list_exo])

Set a list of endogenous-exogenous pairs for goal seeking.

Simulation.model_compile(self[, list_eqs])

Recompiles a list of equations, or all equations if no list is specified.

Simulation.model_simulate(self, from_period, ...)

Run the simulation of a model for a given sample.

Simulation.model_calculate_SCC(self, ...[, ...])

Decompose the model into Strongly Connex Components (SCC) and reorder it.

Simulation.model_simulate_SCC(self, ...[, ...])

Simulates a model previously decomposed into Strongly Connex Components (SCC) and reordered.

LEC

execute_lec(lec[, period])

Compute a LEC formula using the current Variables and Scalars databases.

REPORTS

execute_report(filepath[, parameters])

Execute an IODE report.

execute_command(command)

Execute one or several IODE commands.

PRINT

w_dest([filename, dest])

Initialise a new output session

w_close()

End an output session.

w_flush()

Flush the output session buffer.

w_print([txt])

Send a string into the output session buffer.

w_print_enum([level, text])

Print a bulleted paragraph of the given level

w_print_cmd([level, text])

Start a code block of the given level or end the block if level < 0

w_print_par([level, text])

Print a paragraph of the given level

w_print_tit([level, title])

Print a title of the given level

w_print_pg_header([arg])

Define the page header as from the current page

w_print_pg_footer([arg])

Define the page footer as from the current page

OTHER LIBRARIES

PANDAS

df_to_ws(df_input[, time_axis_name])

ws_to_df([vars_pattern, vars_axis_name, ...])

LARRAY

larray_to_ws(la_input[, time_axis_name, sep])

ws_to_larray([vars_pattern, vars_axis_name, ...])

MISCELLANEOUS

is_NA(value)

Check whether a float value represents a valid IODE number or an IODE Not Available \(NA\) value.

suppress_msgs()

Suppress the output during an IODE session.

reset_msgs()

Reset the normal output mechanism during an IODE session.

DEPRECATED

ws_content([pattern, obj_type])

ws_clear(filetype)

Clear WS of the given filetype (COMMENTS..VARIABLES)

ws_clear_all()

Clear all WS

ws_load(filename, filetype)

Load an IODE file and return the number of read objects

ws_save(filename, filetype)

Save the current IODE workspace of a given type

delete_objects([pattern, obj_type])

delete_obj(obj_name, obj_type)

data_update(obj_name, obj_value, obj_type)

ws_content_cmt([pattern])

Returns the list of comment names corresponding to the given pattern

ws_clear_cmt()

ws_load_cmt(filename)

ws_save_cmt(filename)

Save the current comment workspace

ws_content_eqs([pattern])

Returns the list of equation names corresponding to the given pattern

ws_clear_eqs()

ws_load_eqs(filename)

ws_save_eqs(filename)

Save the current equation workspace

ws_content_idt([pattern])

Returns the list of identity names corresponding to the given pattern

ws_clear_idt()

ws_load_idt(filename)

ws_save_idt(filename)

Save the current identity workspace

ws_content_lst([pattern])

ws_clear_lst()

ws_load_lst(filename)

ws_save_lst(filename)

Save the current list workspace

ws_content_scl([pattern])

ws_clear_scl()

ws_load_scl(filename)

ws_save_scl(filename)

Save the current scalar workspace

ws_content_tbl([pattern])

ws_clear_tbl()

ws_load_tbl(filename)

ws_save_tbl(filename)

Save the current table workspace

ws_content_var([pattern])

ws_clear_var()

ws_load_var(filename)

ws_save_var(filename)

delete_cmt(name)

get_cmt(name)

set_cmt(name, cmt)

data_update_cmt(obj_name, obj_value)

get_eqs_lec(eq_name)

get_eqs(eq_name)

set_eqs(eq_name, lec)

data_update_eqs(obj_name, obj_value)

delete_eqs(name)

get_idt(name)

Return the LEC formula of an IODE identity

set_idt(name, idt)

Update or create an identity

idt_execute([sample, idt_list, var_files, ...])

Execute a list of identities

data_update_idt(obj_name, obj_value)

delete_idt(name)

get_lst(name)

Return a list as a string

set_lst(name, lst)

Update or create a list from a string

data_update_lst(obj_name, obj_value)

delete_lst(name)

get_scl(name)

Get an IODE scalar in an iode.Scalar class instance

set_scl(name, scalar)

Create or update an IODE scalar from an iode.Scalar class instance

data_update_scl(obj_name[, value, relax, stderr])

delete_scl(name)

delete_tbl(name)

get_var(varname)

get_var_as_ndarray(varname[, copy])

set_var(varname, py_values)

data_update_var(varname, values[, ...])

delete_var(name)

ws_sample_nb_periods()

ws_sample_to_string()

ws_sample_to_list([from_period, to_period, ...])

ws_sample_get()

ws_sample_set(from_period, to_period)

exec_lec(lec[, t])

eqs_estimate(eq_list, afrom, ato)

model_simulate(sample_from, sample_to[, ...])

model_calc_scc([nb_passes, pre_listname, ...])

model_simulate_scc(sample_from, sample_to[, ...])

model_simulate_save_parms([eps, relax, ...])

model_simulate_maxit()

model_simulate_eps()

model_simulate_relax()

model_simulate_nb_passes()

model_simulate_sort_algo()

model_simulate_init_values()

model_simulate_niter(period)

model_simulate_norm(period)

report_exec(filename_parms)

reportline_exec(repline)