fumitoh / modelx

Use Python like a spreadsheet!
https://modelx.io
GNU Lesser General Public License v3.0
89 stars 20 forks source link

How to run the Asset Model through Ipython In Spyder? #89

Open AADYABAJAJ opened 8 months ago

AADYABAJAJ commented 8 months ago

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?

fumitoh commented 8 months ago

Maybe QuantlibBondSample is not in your current directory?

Insert

import os
print(os.getcwd())

to check the current directory.