# Sign restrictions on structural VARs

**URL:** https://discourse.julialang.org/t/sign-restrictions-on-structural-vars/39268
**Category:** Finance and Economics
**Tags:** time-series
**Created:** [May 11, 2020, 8:34am UTC](https://discourse.julialang.org/t/sign-restrictions-on-structural-vars/39268 "2020-05-11T08:34:35Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![donk\_fish](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/donk_fish/32/14775_2.png) [@donk\_fish](https://discourse.julialang.org/u/donk_fish)
#### Post date: [May 11, 2020, 8:34am UTC](https://discourse.julialang.org/t/sign-restrictions-on-structural-vars/39268/1 "2020-05-11T08:34:36Z")

</div>

Good morning,

I’m curious how far Julia has gotten with libraries to estimate various types of (S)VAR models?

For example, is there a library that implements sign restrictions? I couldn’t find anything by searching.

---

<div class="post-metadata">

### Author: ![oliver](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oliver/32/19264_2.png) [@oliver](https://discourse.julialang.org/u/oliver)
#### Post date: [May 16, 2020, 12:43pm UTC](https://discourse.julialang.org/t/sign-restrictions-on-structural-vars/39268/2 "2020-05-16T12:43:19Z")

</div>

Did you try searching here: [JuliaHub](https://juliahub.com/ui/Home)

---

<div class="post-metadata">

### Author: ![donk\_fish](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/donk_fish/32/14775_2.png) [@donk\_fish](https://discourse.julialang.org/u/donk_fish)
#### Post date: [May 16, 2020, 1:29pm UTC](https://discourse.julialang.org/t/sign-restrictions-on-structural-vars/39268/3 "2020-05-16T13:29:34Z")

</div>

Thanks for the tip, that looks like a good resource. At least a bunch of packages have parts of what I need.

---

<div class="post-metadata">

### Author: ![raphaelsaavedra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/raphaelsaavedra/32/27631_2.png) [@raphaelsaavedra](https://discourse.julialang.org/u/raphaelsaavedra)
#### Post date: [May 16, 2020, 4:55pm UTC](https://discourse.julialang.org/t/sign-restrictions-on-structural-vars/39268/4 "2020-05-16T16:55:44Z")

</div>

Hi @donk_fish,

Maybe not precisely what you’re looking for, but we have a package for state space time series models: [GitHub - LAMPSPUC/StateSpaceModels.jl: StateSpaceModels.jl is a Julia package for time-series analysis using state-space models.](https://github.com/LAMPSPUC/StateSpaceModels.jl). We don’t have restrictions such as the one you mentioned implemented currently, but maybe it interests you.

---

<div class="post-metadata">

### Author: ![donk\_fish](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/donk_fish/32/14775_2.png) [@donk\_fish](https://discourse.julialang.org/u/donk_fish)
#### Post date: [May 17, 2020, 3:30pm UTC](https://discourse.julialang.org/t/sign-restrictions-on-structural-vars/39268/5 "2020-05-17T15:30:01Z")

</div>

Thanks, that’s at least one of the necessary building blocks! Maybe it’s not that hard to extend it/make a new lib on top with common VAR stuff. If I’m ever inspired and have the time. The allure of plug’n’play is the only thing that keeps me going back to R.

---

<div class="post-metadata">

### Author: ![Albert\_Zevelev](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/albert_zevelev/32/11844_2.png) [@Albert\_Zevelev](https://discourse.julialang.org/u/Albert_Zevelev)
#### Post date: [July 7, 2020, 8:11am UTC](https://discourse.julialang.org/t/sign-restrictions-on-structural-vars/39268/6 "2020-07-07T08:11:20Z")

</div>

@donk_fish  
Here is a link to Julia code for sign-restricted VAR:

> **[Haroon Mumtaz - Example code](https://sites.google.com/site/hmumtaz77/code)**
>
> Notes and Code on Applied Bayesian Econometrics for Central Bankers. (Code)
> VAR with SVOL in mean and correlation between level and volatility shocks. See Mumtaz (2018)
> Panel Threshold VAR with hierarchical prior (Matlab code)
> Panel VAR with...

You’re gonna have to update it a little so it works w/ the latest Julia.

See my note up the TS ecosystem:

> [@How can we create a leaner ecosystem for Julia?](https://discourse.julialang.org/t/how-can-we-create-a-leaner-ecosystem-for-julia/32904):
>
> Comparisons of Julia w/ [other languages](https://www.infoworld.com/article/3241107/julia-vs-python-which-is-best-for-data-science.html) often say one disadvantage of Julia is that it has fewer 3rd party packages. I tend to disagree. Julia doesn’t need more packages, it needs better packages (w/ more functionality). For example, two recent posts about time-series ([here](https://discourse.julialang.org/t/package-for-time-series/29555)) & ([here](https://discourse.julialang.org/t/tsanalysis-time-series-analysis-and-state-space-modelling/30672/2)) highlight the amount of redundancy & lack of cooperation between Julia developers. Consider some packages listed in the posts & others I found on my own: [TSAnalysis](https://github.com/fipelle/TSAnalysis.jl), [ARFIMA](https://github.com/Datseris/ARFIMA.jl),[StateSpaceModels](https://github.com/LAMPSPUC/StateSpaceModels.jl), [ARMAProcesses](https://bitbucket.org/cgeoga/armaprocesses.jl/src/master/), [TimeS…](https://github.com/JuliaStats/TimeSeries.jl)
