# ranieridugo/mfou architecture

> Architecture diagram of the GitHub repository ranieridugo/mfou, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ranieridugo/mfou
- Repository: https://github.com/ranieridugo/mfou

## Overview

##### Project type and purpose
- This is a reproducible research repository providing supplementary material (code, data, generated HTML) for two academic papers on multivariate stochastic processes.
- It is not a web application or microservice architecture but a data-processing and documentation pipeline that:
- Loads raw CSV files
- Runs R and C code to compute results
- Generates HTML pages (index.html and the online_appendix) for publication

##### File structure
- Top-level:
- CITATION.cff, LICENSE, README.md – metadata
- index.html – entry point for the supplement
- online_appendix/ – folder holding final HTML pages and associated CSV data
- code/ directory:
- R scripts (.R) implementing functions and driving analyses (f_covariance.R, f_estimator_*.R, p_empirics.R)
- A C source (sim2FOU.c) likely compiled or called by R for simulation
- Raw CSV input data for estimators (mde_*.csv)
- online_appendix/files_online_appendix:
- CSV result tables used by the HTML pages

##### README
- States the supplement supports two arXiv papers

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Raw Data"
        Raw1["mde_asy_l52050_…csv"]:::data
        Raw2["mde_cau_l52050_…csv"]:::data
        Raw3["mde_exa_l52050_…csv"]:::data
    end

    subgraph "Code Modules"
        sim["Simulation Module (C)"]:::code
        subgraph "R Analysis Functions"
            cov["f_covariance.R"]:::code
            covd["f_covariance_derivatives.R"]:::code
            dgp["f_estimator_dgp24.R"]:::code
            mde["f_estimator_mde.R"]:::code
            wxy["f_estimator_wxy23.R"]:::code
            spill["f_spillovers.R"]:::code
        end
        pemp["Orchestration Script (p_empirics.R)"]:::code
    end

    subgraph "Result Tables (CSV)"
        r1["matrix_asy_cov.csv"]:::data
        r2["matrix_asy_eta.csv"]:::data
        r3["matrix_asy_rho.csv"]:::data
        r4["matrix_exa_caus_eta.csv"]:::data
        r5["matrix_exa_caus_rho.csv"]:::data
        r6["table_asy_univ.csv"]:::data
        r7["table_exa_caus_univ.csv"]:::data
    end

    subgraph "HTML Output"
        idx["index.html"]:::doc
        page0["page0_ind.html"]:::doc
        page1["page1_ccfe.html"]:::doc
        page2["page2_ccfl.html"]:::doc
        page3["page3_esta.html"]:::doc
        page4["page4_ccfa.html"]:::doc
        page5["page5_estc.html"]:::doc
        page6["page6_ccfc.html"]:::doc
    end

    Raw1 -->|feeds| cov
    Raw2 -->|feeds| dgp
    Raw3 -->|feeds| wxy

    pemp -->|orchestrates| cov
    pemp -->|orchestrates| covd
    pemp -->|orchestrates| dgp
    pemp -->|orchestrates| mde
    pemp -->|orchestrates| wxy
    pemp -->|orchestrates| spill

    sim <-->|called by| cov
    sim <-->|called by| covd
    sim <-->|called by| dgp
    sim <-->|called by| mde
    sim <-->|called by| wxy
    sim <-->|called by| spill

    cov -->|produces| r1
    cov -->|produces| r2
    cov -->|produces| r3
    dgp -->|produces| r4
    dgp -->|produces| r5
    mde -->|produces| r6
    wxy -->|produces| r7

    r1 -->|used in| idx
    r2 -->|used in| idx
    r3 -->|used in| idx
    r4 -->|used in| idx
    r5 -->|used in| idx
    r6 -->|used in| idx
    r7 -->|used in| idx

    idx --> page0
    idx --> page1
    idx --> page2
    idx --> page3
    idx --> page4
    idx --> page5
    idx --> page6

    click Raw1 "https://github.com/ranieridugo/mfou/blob/main/code/mde_asy_l52050_AEX_AORD_BFX_BSESN_BVSP_DJI_FCHI_FTSE_GDAXI_HSI_IBEX_IXIC_KS11_KSE_MXX_N225_NSEI_RUT_SPX_SSEC_SSMI_STOXX50E.csv"
    click Raw2 "https://github.com/ranieridugo/mfou/tree/main/code/mde_cau_l52050_…csv"
    click Raw3 "https://github.com/ranieridugo/mfou/tree/main/code/mde_exa_l52050_…csv"
    click sim "https://github.com/ranieridugo/mfou/blob/main/code/sim2FOU.c"
    click cov "https://github.com/ranieridugo/mfou/blob/main/code/f_covariance.R"
    click covd "https://github.com/ranieridugo/mfou/blob/main/code/f_covariance_derivatives.R"
    click dgp "https://github.com/ranieridugo/mfou/blob/main/code/f_estimator_dgp24.R"
    click mde "https://github.com/ranieridugo/mfou/blob/main/code/f_estimator_mde.R"
    click wxy "https://github.com/ranieridugo/mfou/blob/main/code/f_estimator_wxy23.R"
    click spill "https://github.com/ranieridugo/mfou/blob/main/code/f_spillovers.R"
    click pemp "https://github.com/ranieridugo/mfou/blob/main/code/p_empirics.R"
    click r1 "https://github.com/ranieridugo/mfou/blob/main/online_appendix/files_online_appendix/matrix_asy_cov.csv"
    click r2 "https://github.com/ranieridugo/mfou/blob/main/online_appendix/files_online_appendix/matrix_asy_eta.csv"
    click r3 "https://github.com/ranieridugo/mfou/blob/main/online_appendix/files_online_appendix/matrix_asy_rho.csv"
    click r4 "https://github.com/ranieridugo/mfou/blob/main/online_appendix/files_online_appendix/matrix_exa_caus_eta.csv"
    click r5 "https://github.com/ranieridugo/mfou/blob/main/online_appendix/files_online_appendix/matrix_exa_caus_rho.csv"
    click r6 "https://github.com/ranieridugo/mfou/blob/main/online_appendix/files_online_appendix/table_asy_univ.csv"
    click r7 "https://github.com/ranieridugo/mfou/blob/main/online_appendix/files_online_appendix/table_exa_caus_univ.csv"
    click idx "https://github.com/ranieridugo/mfou/blob/main/index.html"
    click page0 "https://github.com/ranieridugo/mfou/blob/main/online_appendix/page0_ind.html"
    click page1 "https://github.com/ranieridugo/mfou/blob/main/online_appendix/page1_ccfe.html"
    click page2 "https://github.com/ranieridugo/mfou/blob/main/online_appendix/page2_ccfl.html"
    click page3 "https://github.com/ranieridugo/mfou/blob/main/online_appendix/page3_esta.html"
    click page4 "https://github.com/ranieridugo/mfou/blob/main/online_appendix/page4_ccfa.html"
    click page5 "https://github.com/ranieridugo/mfou/blob/main/online_appendix/page5_estc.html"
    click page6 "https://github.com/ranieridugo/mfou/blob/main/online_appendix/page6_ccfc.html"

    classDef code fill:#ADD8E6,stroke:#000,stroke-width:1px
    classDef data fill:#90EE90,stroke:#000,stroke-width:1px
    classDef doc fill:#FFA500,stroke:#000,stroke-width:1px
```
