fumitoh / modelx

Use Python like a spreadsheet!

Home Page:https://modelx.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to run the Asset Model through Ipython In Spyder?

AADYABAJAJ opened this issue · comments

Hello All,

I downloaded the version of QuantLib saved here - https://modelx.io/blog/2022/02/13/modeling-assets-with-quantlib/.

This was done as the main QuantLib was somehow very hard to download.

I am able to run this model through Spyder. But when I try to call it using IPython using the below code:

import modelx as mx
asset = mx.read_model("QuantlibBondSample")

and the below error appears:
FileNotFoundError: [Errno 2] No such file or directory: 'QuantlibBondSample_model.py'

Could you please guide as to what I am doing wrong?

Maybe QuantlibBondSample is not in your current directory?

Insert

import os
print(os.getcwd())

to check the current directory.