You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i got error "ImportError: cannot import name 'ols'"
what am i missing?
Traceback (most recent call last):
File "C:/Users/lei.wang/AppData/Local/Continuum/Anaconda3/Lib/site-packages/finmarketpy_examples/backtest_example.py", line 30, in
from finmarketpy.backtest import BacktestRequest, Backtest
File "C:\Users\lei.wang\AppData\Local\Programs\Python\Python36-32\lib\site-packages\finmarketpy_init_.py", line 1, in
from finmarketpy import (backtest, economics, util)
File "C:\Users\lei.wang\AppData\Local\Programs\Python\Python36-32\lib\site-packages\finmarketpy\backtest_init_.py", line 3, in
from finmarketpy.backtest.backtestengine import Backtest
File "C:\Users\lei.wang\AppData\Local\Programs\Python\Python36-32\lib\site-packages\finmarketpy\backtest\backtestengine.py", line 17, in
from findatapy.util import LoggerManager
File "C:\Users\lei.wang\AppData\Local\Programs\Python\Python36-32\lib\site-packages\findatapy_init_.py", line 3, in
from findatapy import (market, timeseries, util)
File "C:\Users\lei.wang\AppData\Local\Programs\Python\Python36-32\lib\site-packages\findatapy\market_init_.py", line 8, in
from findatapy.market.market import Market, FXVolFactory, FXCrossFactory, FXConv
File "C:\Users\lei.wang\AppData\Local\Programs\Python\Python36-32\lib\site-packages\findatapy\market\market.py", line 461, in
from findatapy.timeseries import Calculations, Filter, Timezone
File "C:\Users\lei.wang\AppData\Local\Programs\Python\Python36-32\lib\site-packages\findatapy\timeseries_init_.py", line 6, in
from findatapy.timeseries.calculations import Calculations
File "C:\Users\lei.wang\AppData\Local\Programs\Python\Python36-32\lib\site-packages\findatapy\timeseries\calculations.py", line 23, in
from pandas.stats.api import ols
ImportError: cannot import name 'ols'
The text was updated successfully, but these errors were encountered:
Hi @albanywang2016 - I think the ols package might be deprecated in newer versions of pandas (also I haven't tried the libraries in Python 3.6, I generally use 3.5). The nearest alternative is statsmodels which uses ols. As a temporary fix I've it to import the statsmodels OLS module, so it should at least run (but don't think the regression functions will work - need to rewrite my code to use statsmodels OLS). You'll need to update the findatapy library on your system. Hopefully it'll work, if not, let me know.
i got error "ImportError: cannot import name 'ols'"
what am i missing?
Traceback (most recent call last):
File "C:/Users/lei.wang/AppData/Local/Continuum/Anaconda3/Lib/site-packages/finmarketpy_examples/backtest_example.py", line 30, in
from finmarketpy.backtest import BacktestRequest, Backtest
File "C:\Users\lei.wang\AppData\Local\Programs\Python\Python36-32\lib\site-packages\finmarketpy_init_.py", line 1, in
from finmarketpy import (backtest, economics, util)
File "C:\Users\lei.wang\AppData\Local\Programs\Python\Python36-32\lib\site-packages\finmarketpy\backtest_init_.py", line 3, in
from finmarketpy.backtest.backtestengine import Backtest
File "C:\Users\lei.wang\AppData\Local\Programs\Python\Python36-32\lib\site-packages\finmarketpy\backtest\backtestengine.py", line 17, in
from findatapy.util import LoggerManager
File "C:\Users\lei.wang\AppData\Local\Programs\Python\Python36-32\lib\site-packages\findatapy_init_.py", line 3, in
from findatapy import (market, timeseries, util)
File "C:\Users\lei.wang\AppData\Local\Programs\Python\Python36-32\lib\site-packages\findatapy\market_init_.py", line 8, in
from findatapy.market.market import Market, FXVolFactory, FXCrossFactory, FXConv
File "C:\Users\lei.wang\AppData\Local\Programs\Python\Python36-32\lib\site-packages\findatapy\market\market.py", line 461, in
from findatapy.timeseries import Calculations, Filter, Timezone
File "C:\Users\lei.wang\AppData\Local\Programs\Python\Python36-32\lib\site-packages\findatapy\timeseries_init_.py", line 6, in
from findatapy.timeseries.calculations import Calculations
File "C:\Users\lei.wang\AppData\Local\Programs\Python\Python36-32\lib\site-packages\findatapy\timeseries\calculations.py", line 23, in
from pandas.stats.api import ols
ImportError: cannot import name 'ols'
The text was updated successfully, but these errors were encountered: