From a706c61e649531165777128c35aa55f0a29ca015 Mon Sep 17 00:00:00 2001 From: wilsonfreitas Date: Mon, 14 Aug 2023 06:15:55 -0300 Subject: [PATCH] site updated --- docs/index.html | 55 +- docs/projects.html | 4 +- docs/search.json | 16 +- .../pagedtable-1.1/css/pagedtable.css | 142 -- .../site_libs/pagedtable-1.1/js/pagedtable.js | 1151 ----------------- 5 files changed, 56 insertions(+), 1312 deletions(-) delete mode 100644 docs/site_libs/pagedtable-1.1/css/pagedtable.css delete mode 100644 docs/site_libs/pagedtable-1.1/js/pagedtable.js diff --git a/docs/index.html b/docs/index.html index 5d791be..98d2158 100644 --- a/docs/index.html +++ b/docs/index.html @@ -173,7 +173,7 @@ ul.task-list li input[type="checkbox"] {
Modified
-

July 24, 2023

+

August 14, 2023

@@ -200,11 +200,13 @@ ul.task-list li input[type="checkbox"] {
  • statistics - Builtin Python library for all basic statistical calculations.
  • sympy - SymPy is a Python library for symbolic mathematics.
  • pymc3 - Probabilistic Programming in Python: Bayesian Modeling and Probabilistic Machine Learning with Theano.
  • +
  • modelx - Python reimagination of spreadsheets as formula-centric objects that are interoperable with pandas.
  • Financial Instruments and Pricing

    @@ -240,7 +244,7 @@ ul.task-list li input[type="checkbox"] {

    Trading & Backtesting

    @@ -394,6 +403,13 @@ ul.task-list li input[type="checkbox"] {
  • FinanceDataReader - Open Source Financial data reader for U.S, Korean, Japanese, Chinese, Vietnamese Stocks
  • pystlouisfed - Python client for Federal Reserve Bank of St. Louis API - FRED, ALFRED, GeoFRED and FRASER.
  • python-bcb - Python interface to Brazilian Central Bank web services.
  • +
  • market-prices - Create meaningful OHLCV datasets from knowledge of exchange-calendars (works out-the-box with data from Yahoo Finance).
  • +
  • tardis-python - Python interface for Tardis.dev high frequency crypto market data
  • +
  • lake-api - Python interface for Crypto Lake high frequency crypto market data
  • +
  • tessa - simple, hassle-free access to price information of financial assets (currently based on yfinance and pycoingecko), including search and a symbol class.
  • +
  • pandaSDMX - Python package that implements SDMX 2.1 (ISO 17369:2013), a format for exchange of statistical data and metadata used by national statistical agencies, central banks, and international organisations.
  • +
  • cif - Python package that include few composite indicators, which summarize multidimensional relationships between individual economic indicators.
  • +
  • finagg - finagg is a Python package that provides implementations of popular and free financial APIs, tools for aggregating historical data from those APIs into SQL databases, and tools for transforming aggregated data into features useful for analysis and AI/ML.
  • @@ -417,6 +433,7 @@ ul.task-list li input[type="checkbox"] {
  • mplfinance - matplotlib utilities for the visualization, and visual analysis, of financial data.
  • finplot - Performant and effortless finance plotting for Python.
  • finvizfinance - Finviz analysis python library.
  • +
  • market-analy - Analysis and interactive charting using market-prices and bqplot.
  • @@ -448,6 +465,8 @@ ul.task-list li input[type="checkbox"] {
  • Reddit WallstreetBets API - Provides daily top 50 stocks from reddit (subreddit) Wallstreetbets and their sentiments via the API.
  • td - Interfaces the ‘twelvedata’ API for stocks and (digital and standard) currencies.
  • rbcb - R interface to Brazilian Central Bank web services.
  • +
  • rb3 - A bunch of downloaders and parsers for data delivered from B3.
  • +
  • simfinapi - Makes ‘SimFin’ data (https://simfin.com/) easily accessible in R.
  • @@ -566,6 +585,8 @@ ul.task-list li input[type="checkbox"] {
  • MarketTechnicals.jl - Technical analysis of financial time series on top of TimeSeries.
  • MarketData.jl - Time series market data.
  • TimeFrames.jl - A Julia library that defines TimeFrame (essentially for resampling TimeSeries).
  • +
  • DataFrames.jl - In-memory tabular data in Julia
  • +
  • TSFrames.jl - Handle timeseries data on top of the powerful and mature DataFrames.jl
  • @@ -587,6 +608,8 @@ ul.task-list li input[type="checkbox"] {
  • Ghostfolio - Wealth management software to keep track of financial assets like stocks, ETFs or cryptocurrencies and make solid, data-driven investment decisions.
  • IndicatorTS - Indicator is a TypeScript module providing various stock technical analysis indicators, strategies, and a backtest framework for trading.
  • ccxt - A JavaScript / Python / PHP cryptocurrency trading API with support for more than 100 bitcoin/altcoin exchanges.
  • +
  • PENDAX - Javascript SDK for Trading/Data API and Websockets for FTX, FTXUS, OKX, Bybit, & More.
  • +
  • Mida - The open-source and cross-platform trading framework (https://www.mida.org/).
  • Data Visualization

    @@ -599,7 +622,6 @@ ul.task-list li input[type="checkbox"] {

    Haskell

    • quantfin - quant finance in pure haskell.
    • -
    • hqfl - Haskell Quantitative Finance Library.
    • Haxcel - Excel Addin for Haskell.
    • Ffinar - A financial maths library in Haskell.
    @@ -651,8 +673,13 @@ ul.task-list li input[type="checkbox"] {
  • QLNet - .Net port.
  • PyQL - Python port.
  • QuantLib.jl - Julia port.
  • +
  • QuantLib-Python Documentation - Documentation for the Python bindings for the QuantLib library
  • + +
  • TA-Lib - perform technical analysis of financial market data. +
  • -
  • TA-Lib - perform technical analysis of financial market data.
  • Portfolio Optimizer - Portfolio Optimizer is a Web API for portfolio analysis and optimization.
  • @@ -668,6 +695,11 @@ ul.task-list li input[type="checkbox"] {

    Rust

    @@ -687,7 +719,6 @@ ul.task-list li input[type="checkbox"] {
  • algorithmic-trading-with-python - Source code for Algorithmic Trading with Python (2020) by Chris Conlan.
  • MEDIUM_NoteBook - Repository containing notebooks of cerlymarco’s posts on Medium.
  • QuantFinance - Training materials in quantitative finance.
  • -
  • MarketAnalysis - Implementing many different methods and popular analysis tools in Python.
  • IPythonScripts - Tutorials about Quantitative Finance in Python and QuantLib: Pricing, xVAs, Hedging, Portfolio Optimisation, Machine Learning and Deep Learning.
  • Computational-Finance-Course - Materials for the course of Computational Finance.
  • Machine-Learning-for-Asset-Managers - Implementation of code snippets, exercises and application to live data from Machine Learning for Asset Managers (Elements in Quantitative Finance) written by Prof. Marcos López de Prado.
  • @@ -702,10 +733,16 @@ ul.task-list li input[type="checkbox"] {
  • QuantFinanceBook - Quantitative Finance book.
  • rough_bergomi - A Python implementation of the rough Bergomi model.
  • frh-fx - A python implementation of the fast-reversion Heston model of Mechkov for FX purposes.
  • -
  • value-investing-studies - A collection of data analysis studies that examine the performance and characteristics of value investing over long periods of time.
  • -
  • machine-learning-asset-management - Machine Learning in Asset Management (by @firmai).
  • -
  • Deep-Learning-Machine-Learning-Stock - Deep Learning and Machine Learning stocks represent a promising long-term or short-term opportunity for investors and traders.
  • -
  • Technical_Analysis_and_Feature_Engineering - Feature Engineering and Feature Importance of Machine Learning in Financial Market.
  • +
  • Value Investing Studies - A collection of data analysis studies that examine the performance and characteristics of value investing over long periods of time.
  • +
  • Machine Learning Asset Management - Machine Learning in Asset Management (by @firmai).
  • +
  • Deep Learning Machine Learning Stock - Deep Learning and Machine Learning stocks represent a promising long-term or short-term opportunity for investors and traders.
  • +
  • Technical Analysis and Feature Engineering - Feature Engineering and Feature Importance of Machine Learning in Financial Market.
  • +
  • Differential Machine Learning and Axes that matter by Brian Huge and Antoine Savine - Implement, demonstrate, reproduce and extend the results of the Risk articles ‘Differential Machine Learning’ (2020) and ‘PCA with a Difference’ (2021) by Huge and Savine, and cover implementation details left out from the papers.
  • +
  • systematictradingexamples - Examples of code related to book Systematic Trading and blog
  • +
  • pysystemtrade_examples - Examples using pysystemtrade for Robert Carver’s blog.
  • +
  • ML_Finance_Codes - Machine Learning in Finance: From Theory to Practice Book
  • +
  • Hands-On Machine Learning for Algorithmic Trading - Hands-On Machine Learning for Algorithmic Trading, published by Packt
  • +
  • financialnoob-misc - Codes from @financialnoob’s posts
  • diff --git a/docs/projects.html b/docs/projects.html index da24d56..d6fbf4a 100644 --- a/docs/projects.html +++ b/docs/projects.html @@ -138,8 +138,8 @@ ul.task-list li input[type="checkbox"] {
    -
    - +
    +
    diff --git a/docs/search.json b/docs/search.json index 20bf6b4..3cd71c9 100644 --- a/docs/search.json +++ b/docs/search.json @@ -67,14 +67,14 @@ "href": "index.html#python", "title": "Awesome Quant", "section": "Python", - "text": "Python\n\nNumerical Libraries & Data Structures\n\nnumpy - NumPy is the fundamental package for scientific computing with Python.\nscipy - SciPy (pronounced “Sigh Pie”) is a Python-based ecosystem of open-source software for mathematics, science, and engineering.\npandas - pandas is an open source, BSD-licensed library providing high-performance, easy-to-use data structures and data analysis tools for the Python programming language.\nquantdsl - Domain specific language for quantitative analytics in finance and trading.\nstatistics - Builtin Python library for all basic statistical calculations.\nsympy - SymPy is a Python library for symbolic mathematics.\npymc3 - Probabilistic Programming in Python: Bayesian Modeling and Probabilistic Machine Learning with Theano.\n\n\n\nFinancial Instruments and Pricing\n\nPyQL - QuantLib’s Python port.\npyfin - Basic options pricing in Python. ARCHIVED\nvollib - vollib is a python library for calculating option prices, implied volatility and greeks.\nQuantPy - A framework for quantitative finance In python.\nFinance-Python - Python tools for Finance.\nffn - A financial function library for Python.\npynance - Lightweight Python library for assembling and analysing financial data.\ntia - Toolkit for integration and analysis.\nhasura/base-python-dash - Hasura quickstart to deploy Dash framework. Written on top of Flask, Plotly.js, and React.js, Dash is ideal for building data visualization apps with highly custom user interfaces in pure Python.\nhasura/base-python-bokeh - Hasura quickstart to visualize data with bokeh library.\npysabr - SABR model Python implementation.\nFinancePy - A Python Finance Library that focuses on the pricing and risk-management of Financial Derivatives, including fixed-income, equity, FX and credit derivatives.\ngs-quant - Python toolkit for quantitative finance\nwillowtree - Robust and flexible Python implementation of the willow tree lattice for derivatives pricing.\nfinancial-engineering - Applications of Monte Carlo methods to financial engineering projects, in Python.\noptlib - A library for financial options pricing written in Python.\ntf-quant-finance - High-performance TensorFlow library for quantitative finance.\nQ-Fin - A Python library for mathematical finance.\nQuantsbin - Tools for pricing and plotting of vanilla option prices, greeks and various other analysis around them.\nfinoptions - Complete python implementation of R package fOptions with partial implementation of fExoticOptions for pricing various options.\n\n\n\nIndicators\n\npandas_talib - A Python Pandas implementation of technical analysis indicators.\nfinta - Common financial technical analysis indicators implemented in Pandas.\nTulipy - Financial Technical Analysis Indicator Library (Python bindings for tulipindicators)\nlppls - A Python module for fitting the Log-Periodic Power Law Singularity (LPPLS) model.\n\n\n\nTrading & Backtesting\n\nBlankly - Fully integrated backtesting, paper trading, and live deployment.\nTA-Lib - Python wrapper for TA-Lib (http://ta-lib.org/).\nzipline - Pythonic algorithmic trading library.\nQuantSoftware Toolkit - Python-based open source software framework designed to support portfolio construction and management.\nquantitative - Quantitative finance, and backtesting library.\nanalyzer - Python framework for real-time financial and backtesting trading strategies.\nbt - Flexible Backtesting for Python.\nbacktrader - Python Backtesting library for trading strategies.\npythalesians - Python library to backtest trading strategies, plot charts, seamlessly download market data, analyse market patterns etc.\npybacktest - Vectorized backtesting framework in Python / pandas, designed to make your backtesting easier.\npyalgotrade - Python Algorithmic Trading Library.\ntradingWithPython - A collection of functions and classes for Quantitative trading.\nPandas TA - Pandas TA is an easy to use Python 3 Pandas Extension with 115+ Indicators. Easily build Custom Strategies.\nta - Technical Analysis Library using Pandas (Python)\nalgobroker - This is an execution engine for algo trading.\npysentosa - Python API for sentosa trading system.\nfinmarketpy - Python library for backtesting trading strategies and analyzing financial markets.\nbinary-martingale - Computer program to automatically trade binary options martingale style.\nfooltrader - the project using big-data technology to provide an uniform way to analyze the whole market.\nzvt - the project using sql,pandas to provide an uniform and extendable way to record data,computing factors,select securites, backtesting,realtime trading and it could show all of them in clearly charts in realtime.\npylivetrader - zipline-compatible live trading library.\npipeline-live - zipline’s pipeline capability with IEX for live trading.\nzipline-extensions - Zipline extensions and adapters for QuantRocket.\nmoonshot - Vectorized backtester and trading engine for QuantRocket based on Pandas.\nPyPortfolioOpt - Financial portfolio optimisation in python, including classical efficient frontier and advanced methods.\nEiten - Eiten is an open source toolkit by Tradytics that implements various statistical and algorithmic investing strategies such as Eigen Portfolios, Minimum Variance Portfolios, Maximum Sharpe Ratio Portfolios, and Genetic Algorithms based Portfolios.\nriskparity.py - fast and scalable design of risk parity portfolios with TensorFlow 2.0\nmlfinlab - Implementations regarding “Advances in Financial Machine Learning” by Marcos Lopez de Prado. (Feature Engineering, Financial Data Structures, Meta-Labeling)\npyqstrat - A fast, extensible, transparent python library for backtesting quantitative strategies.\nNowTrade - Python library for backtesting technical/mechanical strategies in the stock and currency markets.\npinkfish - A backtester and spreadsheet library for security analysis.\naat - Async Algorithmic Trading Engine\nBacktesting.py - Backtest trading strategies in Python\ncatalyst - An Algorithmic Trading Library for Crypto-Assets in Python\nquantstats - Portfolio analytics for quants, written in Python\nqtpylib - QTPyLib, Pythonic Algorithmic Trading http://qtpylib.io\nQuantdom - Python-based framework for backtesting trading strategies & analyzing financial markets [GUI :neckbeard:]\nfreqtrade - Free, open source crypto trading bot\nalgorithmic-trading-with-python - Free pandas and scikit-learn resources for trading simulation, backtesting, and machine learning on financial data.\nDeepDow - Portfolio optimization with deep learning\nQlib - An AI-oriented Quantitative Investment Platform by Microsoft. Full ML pipeline of data processing, model training, back-testing; and covers the entire chain of quantitative investment: alpha seeking, risk modeling, portfolio optimization, and order execution.\nmachine-learning-for-trading - Code and resources for Machine Learning for Algorithmic Trading\nAlphaPy - Automated Machine Learning [AutoML] with Python, scikit-learn, Keras, XGBoost, LightGBM, and CatBoost\njesse - An advanced crypto trading bot written in Python\nrqalpha - A extendable, replaceable Python algorithmic backtest && trading framework supporting multiple securities.\nFinRL-Library - A Deep Reinforcement Learning Library for Automated Trading in Quantitative Finance. NeurIPS 2020.\nbulbea - Deep Learning based Python Library for Stock Market Prediction and Modelling.\nib_nope - Automated trading system for NOPE strategy over IBKR TWS.\nOctoBot - Open source cryptocurrency trading bot for high frequency, arbitrage, TA and social trading with an advanced web interface.\nbta-lib - Technical Analysis library in pandas for backtesting algotrading and quantitative analysis.\nStock-Prediction-Models - Gathers machine learning and deep learning models for Stock forecasting including trading bots and simulations.\nTuneTA - TuneTA optimizes technical indicators using a distance correlation measure to a user defined target feature such as next day return.\nAutoTrader - A Python-based development platform for automated trading systems - from backtesting to optimisation to livetrading.\nfast-trade - A library built with backtest portability and performance in mind for backtest trading strategies.\nqf-lib - QF-Lib is a Python library that provides high quality tools for quantitative finance.\ntda-api - Gather data and trade equities, options, and ETFs via TDAmeritrade.\nvectorbt - Find your trading edge, using a powerful toolkit for backtesting, algorithmic trading, and research.\nLean - Lean Algorithmic Trading Engine by QuantConnect (Python, C#).\nfast-trade - Low code backtesting library utilizing pandas and technical analysis indicators.\n\n\n\nRisk Analysis\n\npyfolio - Portfolio and risk analytics in Python.\nempyrical - Common financial risk and performance metrics.\nfecon235 - Computational tools for financial economics include: Gaussian Mixture model of leptokurtotic risk, adaptive Boltzmann portfolios.\nfinance - Financial Risk Calculations. Optimized for ease of use through class construction and operator overload.\nqfrm - Quantitative Financial Risk Management: awesome OOP tools for measuring, managing and visualizing risk of financial instruments and portfolios.\nvisualize-wealth - Portfolio construction and quantitative analysis.\nVisualPortfolio - This tool is used to visualize the perfomance of a portfolio.\nuniversal-portfolios - Collection of algorithms for online portfolio selection.\nFinQuant - A program for financial portfolio management, analysis and optimisation.\nEmpyrial - Portfolio’s risk and performance analytics and returns predictions.\nrisktools - Risk tools for use within the crude and crude products trading space with partial implementation of R’s PerformanceAnalytics.\nRiskfolio-Lib - Portfolio Optimization and Quantitative Strategic Asset Allocation in Python.\n\n\n\nFactor Analysis\n\nalphalens - Performance analysis of predictive alpha factors.\nSpectre - GPU-accelerated Factors analysis library and Backtester\n\n\n\nTime Series\n\nARCH - ARCH models in Python.\nstatsmodels - Python module that allows users to explore data, estimate statistical models, and perform statistical tests.\ndynts - Python package for timeseries analysis and manipulation.\nPyFlux - Python library for timeseries modelling and inference (frequentist and Bayesian) on models.\ntsfresh - Automatic extraction of relevant features from time series.\nhasura/quandl-metabase - Hasura quickstart to visualize Quandl’s timeseries datasets with Metabase.\nFacebook Prophet - Tool for producing high quality forecasts for time series data that has multiple seasonality with linear or non-linear growth.\ntsmoothie - A python library for time-series smoothing and outlier detection in a vectorized way.\npmdarima - A statistical library designed to fill the void in Python’s time series analysis capabilities, including the equivalent of R’s auto.arima function.\ngluon-ts - vProbabilistic time series modeling in Python.\n\n\n\nCalendars\n\nexchange_calendars - Stock Exchange Trading Calendars.\nbizdays - Business days calculations and utilities.\npandas_market_calendars - Exchange calendars to use with pandas for trading applications.\n\n\n\nData Sources\n\nyfinance - Yahoo! Finance market data downloader (+faster Pandas Datareader)\nfindatapy - Python library to download market data via Bloomberg, Quandl, Yahoo etc.\ngooglefinance - Python module to get real-time stock data from Google Finance API.\nyahoo-finance - Python module to get stock data from Yahoo! Finance.\npandas-datareader - Python module to get data from various sources (Google Finance, Yahoo Finance, FRED, OECD, Fama/French, World Bank, Eurostat…) into Pandas datastructures such as DataFrame, Panel with a caching mechanism.\npandas-finance - High level API for access to and analysis of financial data.\npyhoofinance - Rapidly queries Yahoo Finance for multiple tickers and returns typed data for analysis.\nyfinanceapi - Finance API for Python.\nyql-finance - yql-finance is simple and fast. API returns stock closing prices for current period of time and current stock ticker (i.e. APPL, GOOGL).\nystockquote - Retrieve stock quote data from Yahoo Finance.\nwallstreet - Real time stock and option data.\nstock_extractor - General Purpose Stock Extractors from Online Resources.\nStockex - Python wrapper for Yahoo! Finance API.\nfinsymbols - Obtains stock symbols and relating information for SP500, AMEX, NYSE, and NASDAQ.\nFRB - Python Client for FRED® API.\ninquisitor - Python Interface to Econdb.com API.\nyfi - Yahoo! YQL library.\nchinesestockapi - Python API to get Chinese stock price.\nexchange - Get current exchange rate.\nticks - Simple command line tool to get stock ticker data.\npybbg - Python interface to Bloomberg COM APIs.\nccy - Python module for currencies.\ntushare - A utility for crawling historical and Real-time Quotes data of China stocks.\njsm - Get the japanese stock market data.\ncn_stock_src - Utility for retrieving basic China stock data from different sources.\ncoinmarketcap - Python API for coinmarketcap.\nafter-hours - Obtain pre market and after hours stock prices for a given symbol.\nbronto-python - Bronto API Integration for Python.\npytdx - Python Interface for retrieving chinese stock realtime quote data from TongDaXin Nodes.\npdblp - A simple interface to integrate pandas and the Bloomberg Open API.\ntiingo - Python interface for daily composite prices/OHLC/Volume + Real-time News Feeds, powered by the Tiingo Data Platform.\niexfinance - Python Interface for retrieving real-time and historical prices and equities data from The Investor’s Exchange.\npyEX - Python interface to IEX with emphasis on pandas, support for streaming data, premium data, points data (economic, rates, commodities), and technical indicators.\nalpaca-trade-api - Python interface for retrieving real-time and historical prices from Alpaca API as well as trade execution.\nmetatrader5 - API Connector to MetaTrader 5 Terminal\nakshare - AkShare is an elegant and simple financial data interface library for Python, built for human beings! https://akshare.readthedocs.io\nyahooquery - Python interface for retrieving data through unofficial Yahoo Finance API.\ninvestpy - Financial Data Extraction from Investing.com with Python! https://investpy.readthedocs.io/\nyliveticker - Live stream of market data from Yahoo Finance websocket.\nbbgbridge - Easy to use Bloomberg Desktop API wrapper for Python.\nalpha_vantage - A python wrapper for Alpha Vantage API for financial data.\nFinanceDataReader - Open Source Financial data reader for U.S, Korean, Japanese, Chinese, Vietnamese Stocks\npystlouisfed - Python client for Federal Reserve Bank of St. Louis API - FRED, ALFRED, GeoFRED and FRASER.\npython-bcb - Python interface to Brazilian Central Bank web services.\n\n\n\nExcel Integration\n\nxlwings - Make Excel fly with Python.\nopenpyxl - Read/Write Excel 2007 xlsx/xlsm files.\nxlrd - Library for developers to extract data from Microsoft Excel spreadsheet files.\nxlsxwriter - Write files in the Excel 2007+ XLSX file format.\nxlwt - Library to create spreadsheet files compatible with MS Excel 97/2000/XP/2003 XLS files, on any platform.\nDataNitro - DataNitro also offers full-featured Python-Excel integration, including UDFs. Trial downloads are available, but users must purchase a license.\nxlloop - XLLoop is an open source framework for implementing Excel user-defined functions (UDFs) on a centralised server (a function server).\nexpy - The ExPy add-in allows easy use of Python directly from within an Microsoft Excel spreadsheet, both to execute arbitrary code and to define new Excel functions.\npyxll - PyXLL is an Excel add-in that enables you to extend Excel using nothing but Python code.\n\n\n\nVisualization\n\nD-Tale - Visualizer for pandas dataframes and xarray datasets.\nmplfinance - matplotlib utilities for the visualization, and visual analysis, of financial data.\nfinplot - Performant and effortless finance plotting for Python.\nfinvizfinance - Finviz analysis python library." + "text": "Python\n\nNumerical Libraries & Data Structures\n\nnumpy - NumPy is the fundamental package for scientific computing with Python.\nscipy - SciPy (pronounced “Sigh Pie”) is a Python-based ecosystem of open-source software for mathematics, science, and engineering.\npandas - pandas is an open source, BSD-licensed library providing high-performance, easy-to-use data structures and data analysis tools for the Python programming language.\nquantdsl - Domain specific language for quantitative analytics in finance and trading.\nstatistics - Builtin Python library for all basic statistical calculations.\nsympy - SymPy is a Python library for symbolic mathematics.\npymc3 - Probabilistic Programming in Python: Bayesian Modeling and Probabilistic Machine Learning with Theano.\nmodelx - Python reimagination of spreadsheets as formula-centric objects that are interoperable with pandas.\n\n\n\nFinancial Instruments and Pricing\n\nOpenBB Terminal - Terminal for investment research for everyone.\nPyQL - QuantLib’s Python port.\npyfin - Basic options pricing in Python. ARCHIVED\nvollib - vollib is a python library for calculating option prices, implied volatility and greeks.\nQuantPy - A framework for quantitative finance In python.\nFinance-Python - Python tools for Finance.\nffn - A financial function library for Python.\npynance - Lightweight Python library for assembling and analysing financial data.\ntia - Toolkit for integration and analysis.\nhasura/base-python-dash - Hasura quickstart to deploy Dash framework. Written on top of Flask, Plotly.js, and React.js, Dash is ideal for building data visualization apps with highly custom user interfaces in pure Python.\nhasura/base-python-bokeh - Hasura quickstart to visualize data with bokeh library.\npysabr - SABR model Python implementation.\nFinancePy - A Python Finance Library that focuses on the pricing and risk-management of Financial Derivatives, including fixed-income, equity, FX and credit derivatives.\ngs-quant - Python toolkit for quantitative finance\nwillowtree - Robust and flexible Python implementation of the willow tree lattice for derivatives pricing.\nfinancial-engineering - Applications of Monte Carlo methods to financial engineering projects, in Python.\noptlib - A library for financial options pricing written in Python.\ntf-quant-finance - High-performance TensorFlow library for quantitative finance.\nQ-Fin - A Python library for mathematical finance.\nQuantsbin - Tools for pricing and plotting of vanilla option prices, greeks and various other analysis around them.\nfinoptions - Complete python implementation of R package fOptions with partial implementation of fExoticOptions for pricing various options.\npypme - PME (Public Market Equivalent) calculation.\nAbsBox - A Python based library to model cashflow for structured product like Asset-backed securities (ABS) and Mortgage-backed securities (MBS).\n\n\n\nIndicators\n\npandas_talib - A Python Pandas implementation of technical analysis indicators.\nfinta - Common financial technical analysis indicators implemented in Pandas.\nTulipy - Financial Technical Analysis Indicator Library (Python bindings for tulipindicators)\nlppls - A Python module for fitting the Log-Periodic Power Law Singularity (LPPLS) model.\n\n\n\nTrading & Backtesting\n\nBlankly - Fully integrated backtesting, paper trading, and live deployment.\nTA-Lib - Python wrapper for TA-Lib (http://ta-lib.org/).\nzipline - Pythonic algorithmic trading library.\nQuantSoftware Toolkit - Python-based open source software framework designed to support portfolio construction and management.\nquantitative - Quantitative finance, and backtesting library.\nanalyzer - Python framework for real-time financial and backtesting trading strategies.\nbt - Flexible Backtesting for Python.\nbacktrader - Python Backtesting library for trading strategies.\npythalesians - Python library to backtest trading strategies, plot charts, seamlessly download market data, analyse market patterns etc.\npybacktest - Vectorized backtesting framework in Python / pandas, designed to make your backtesting easier.\npyalgotrade - Python Algorithmic Trading Library.\nbasana - A Python async and event driven framework for algorithmic trading, with a focus on crypto currencies.\ntradingWithPython - A collection of functions and classes for Quantitative trading.\nPandas TA - Pandas TA is an easy to use Python 3 Pandas Extension with 115+ Indicators. Easily build Custom Strategies.\nta - Technical Analysis Library using Pandas (Python)\nalgobroker - This is an execution engine for algo trading.\npysentosa - Python API for sentosa trading system.\nfinmarketpy - Python library for backtesting trading strategies and analyzing financial markets.\nbinary-martingale - Computer program to automatically trade binary options martingale style.\nfooltrader - the project using big-data technology to provide an uniform way to analyze the whole market.\nzvt - the project using sql,pandas to provide an uniform and extendable way to record data,computing factors,select securites, backtesting,realtime trading and it could show all of them in clearly charts in realtime.\npylivetrader - zipline-compatible live trading library.\npipeline-live - zipline’s pipeline capability with IEX for live trading.\nzipline-extensions - Zipline extensions and adapters for QuantRocket.\nmoonshot - Vectorized backtester and trading engine for QuantRocket based on Pandas.\nPyPortfolioOpt - Financial portfolio optimisation in python, including classical efficient frontier and advanced methods.\nEiten - Eiten is an open source toolkit by Tradytics that implements various statistical and algorithmic investing strategies such as Eigen Portfolios, Minimum Variance Portfolios, Maximum Sharpe Ratio Portfolios, and Genetic Algorithms based Portfolios.\nriskparity.py - fast and scalable design of risk parity portfolios with TensorFlow 2.0\nmlfinlab - Implementations regarding “Advances in Financial Machine Learning” by Marcos Lopez de Prado. (Feature Engineering, Financial Data Structures, Meta-Labeling)\npyqstrat - A fast, extensible, transparent python library for backtesting quantitative strategies.\nNowTrade - Python library for backtesting technical/mechanical strategies in the stock and currency markets.\npinkfish - A backtester and spreadsheet library for security analysis.\naat - Async Algorithmic Trading Engine\nBacktesting.py - Backtest trading strategies in Python\ncatalyst - An Algorithmic Trading Library for Crypto-Assets in Python\nquantstats - Portfolio analytics for quants, written in Python\nqtpylib - QTPyLib, Pythonic Algorithmic Trading http://qtpylib.io\nQuantdom - Python-based framework for backtesting trading strategies & analyzing financial markets [GUI :neckbeard:]\nfreqtrade - Free, open source crypto trading bot\nalgorithmic-trading-with-python - Free pandas and scikit-learn resources for trading simulation, backtesting, and machine learning on financial data.\nDeepDow - Portfolio optimization with deep learning\nQlib - An AI-oriented Quantitative Investment Platform by Microsoft. Full ML pipeline of data processing, model training, back-testing; and covers the entire chain of quantitative investment: alpha seeking, risk modeling, portfolio optimization, and order execution.\nmachine-learning-for-trading - Code and resources for Machine Learning for Algorithmic Trading\nAlphaPy - Automated Machine Learning [AutoML] with Python, scikit-learn, Keras, XGBoost, LightGBM, and CatBoost\njesse - An advanced crypto trading bot written in Python\nrqalpha - A extendable, replaceable Python algorithmic backtest && trading framework supporting multiple securities.\nFinRL-Library - A Deep Reinforcement Learning Library for Automated Trading in Quantitative Finance. NeurIPS 2020.\nbulbea - Deep Learning based Python Library for Stock Market Prediction and Modelling.\nib_nope - Automated trading system for NOPE strategy over IBKR TWS.\nOctoBot - Open source cryptocurrency trading bot for high frequency, arbitrage, TA and social trading with an advanced web interface.\nbta-lib - Technical Analysis library in pandas for backtesting algotrading and quantitative analysis.\nStock-Prediction-Models - Gathers machine learning and deep learning models for Stock forecasting including trading bots and simulations.\nTuneTA - TuneTA optimizes technical indicators using a distance correlation measure to a user defined target feature such as next day return.\nAutoTrader - A Python-based development platform for automated trading systems - from backtesting to optimisation to livetrading.\nfast-trade - A library built with backtest portability and performance in mind for backtest trading strategies.\nqf-lib - QF-Lib is a Python library that provides high quality tools for quantitative finance.\ntda-api - Gather data and trade equities, options, and ETFs via TDAmeritrade.\nvectorbt - Find your trading edge, using a powerful toolkit for backtesting, algorithmic trading, and research.\nLean - Lean Algorithmic Trading Engine by QuantConnect (Python, C#).\nfast-trade - Low code backtesting library utilizing pandas and technical analysis indicators.\npysystemtrade - pysystemtrade is the open source version of Robert Carver’s backtesting and trading engine that implements systems according to the framework outlined in his book “Systematic Trading”, which is further developed on his blog.\npytrendseries - Detect trend in time series, drawdown, drawdown within a constant look-back window , maximum drawdown, time underwater.\nPyLOB - Fully functioning fast Limit Order Book written in Python.\nPyBroker - Algorithmic Trading with Machine Learning.\n\n\n\nRisk Analysis\n\npyfolio - Portfolio and risk analytics in Python.\nempyrical - Common financial risk and performance metrics.\nfecon235 - Computational tools for financial economics include: Gaussian Mixture model of leptokurtotic risk, adaptive Boltzmann portfolios.\nfinance - Financial Risk Calculations. Optimized for ease of use through class construction and operator overload.\nqfrm - Quantitative Financial Risk Management: awesome OOP tools for measuring, managing and visualizing risk of financial instruments and portfolios.\nvisualize-wealth - Portfolio construction and quantitative analysis.\nVisualPortfolio - This tool is used to visualize the perfomance of a portfolio.\nuniversal-portfolios - Collection of algorithms for online portfolio selection.\nFinQuant - A program for financial portfolio management, analysis and optimisation.\nEmpyrial - Portfolio’s risk and performance analytics and returns predictions.\nrisktools - Risk tools for use within the crude and crude products trading space with partial implementation of R’s PerformanceAnalytics.\nRiskfolio-Lib - Portfolio Optimization and Quantitative Strategic Asset Allocation in Python.\n\n\n\nFactor Analysis\n\nalphalens - Performance analysis of predictive alpha factors.\nSpectre - GPU-accelerated Factors analysis library and Backtester\n\n\n\nTime Series\n\nARCH - ARCH models in Python.\nstatsmodels - Python module that allows users to explore data, estimate statistical models, and perform statistical tests.\ndynts - Python package for timeseries analysis and manipulation.\nPyFlux - Python library for timeseries modelling and inference (frequentist and Bayesian) on models.\ntsfresh - Automatic extraction of relevant features from time series.\nhasura/quandl-metabase - Hasura quickstart to visualize Quandl’s timeseries datasets with Metabase.\nFacebook Prophet - Tool for producing high quality forecasts for time series data that has multiple seasonality with linear or non-linear growth.\ntsmoothie - A python library for time-series smoothing and outlier detection in a vectorized way.\npmdarima - A statistical library designed to fill the void in Python’s time series analysis capabilities, including the equivalent of R’s auto.arima function.\ngluon-ts - vProbabilistic time series modeling in Python.\n\n\n\nCalendars\n\nexchange_calendars - Stock Exchange Trading Calendars.\nbizdays - Business days calculations and utilities.\npandas_market_calendars - Exchange calendars to use with pandas for trading applications.\n\n\n\nData Sources\n\nyfinance - Yahoo! Finance market data downloader (+faster Pandas Datareader)\nfindatapy - Python library to download market data via Bloomberg, Quandl, Yahoo etc.\ngooglefinance - Python module to get real-time stock data from Google Finance API.\nyahoo-finance - Python module to get stock data from Yahoo! Finance.\npandas-datareader - Python module to get data from various sources (Google Finance, Yahoo Finance, FRED, OECD, Fama/French, World Bank, Eurostat…) into Pandas datastructures such as DataFrame, Panel with a caching mechanism.\npandas-finance - High level API for access to and analysis of financial data.\npyhoofinance - Rapidly queries Yahoo Finance for multiple tickers and returns typed data for analysis.\nyfinanceapi - Finance API for Python.\nyql-finance - yql-finance is simple and fast. API returns stock closing prices for current period of time and current stock ticker (i.e. APPL, GOOGL).\nystockquote - Retrieve stock quote data from Yahoo Finance.\nwallstreet - Real time stock and option data.\nstock_extractor - General Purpose Stock Extractors from Online Resources.\nStockex - Python wrapper for Yahoo! Finance API.\nfinsymbols - Obtains stock symbols and relating information for SP500, AMEX, NYSE, and NASDAQ.\nFRB - Python Client for FRED® API.\ninquisitor - Python Interface to Econdb.com API.\nyfi - Yahoo! YQL library.\nchinesestockapi - Python API to get Chinese stock price.\nexchange - Get current exchange rate.\nticks - Simple command line tool to get stock ticker data.\npybbg - Python interface to Bloomberg COM APIs.\nccy - Python module for currencies.\ntushare - A utility for crawling historical and Real-time Quotes data of China stocks.\njsm - Get the japanese stock market data.\ncn_stock_src - Utility for retrieving basic China stock data from different sources.\ncoinmarketcap - Python API for coinmarketcap.\nafter-hours - Obtain pre market and after hours stock prices for a given symbol.\nbronto-python - Bronto API Integration for Python.\npytdx - Python Interface for retrieving chinese stock realtime quote data from TongDaXin Nodes.\npdblp - A simple interface to integrate pandas and the Bloomberg Open API.\ntiingo - Python interface for daily composite prices/OHLC/Volume + Real-time News Feeds, powered by the Tiingo Data Platform.\niexfinance - Python Interface for retrieving real-time and historical prices and equities data from The Investor’s Exchange.\npyEX - Python interface to IEX with emphasis on pandas, support for streaming data, premium data, points data (economic, rates, commodities), and technical indicators.\nalpaca-trade-api - Python interface for retrieving real-time and historical prices from Alpaca API as well as trade execution.\nmetatrader5 - API Connector to MetaTrader 5 Terminal\nakshare - AkShare is an elegant and simple financial data interface library for Python, built for human beings! https://akshare.readthedocs.io\nyahooquery - Python interface for retrieving data through unofficial Yahoo Finance API.\ninvestpy - Financial Data Extraction from Investing.com with Python! https://investpy.readthedocs.io/\nyliveticker - Live stream of market data from Yahoo Finance websocket.\nbbgbridge - Easy to use Bloomberg Desktop API wrapper for Python.\nalpha_vantage - A python wrapper for Alpha Vantage API for financial data.\nFinanceDataReader - Open Source Financial data reader for U.S, Korean, Japanese, Chinese, Vietnamese Stocks\npystlouisfed - Python client for Federal Reserve Bank of St. Louis API - FRED, ALFRED, GeoFRED and FRASER.\npython-bcb - Python interface to Brazilian Central Bank web services.\nmarket-prices - Create meaningful OHLCV datasets from knowledge of exchange-calendars (works out-the-box with data from Yahoo Finance).\ntardis-python - Python interface for Tardis.dev high frequency crypto market data\nlake-api - Python interface for Crypto Lake high frequency crypto market data\ntessa - simple, hassle-free access to price information of financial assets (currently based on yfinance and pycoingecko), including search and a symbol class.\npandaSDMX - Python package that implements SDMX 2.1 (ISO 17369:2013), a format for exchange of statistical data and metadata used by national statistical agencies, central banks, and international organisations.\ncif - Python package that include few composite indicators, which summarize multidimensional relationships between individual economic indicators.\nfinagg - finagg is a Python package that provides implementations of popular and free financial APIs, tools for aggregating historical data from those APIs into SQL databases, and tools for transforming aggregated data into features useful for analysis and AI/ML.\n\n\n\nExcel Integration\n\nxlwings - Make Excel fly with Python.\nopenpyxl - Read/Write Excel 2007 xlsx/xlsm files.\nxlrd - Library for developers to extract data from Microsoft Excel spreadsheet files.\nxlsxwriter - Write files in the Excel 2007+ XLSX file format.\nxlwt - Library to create spreadsheet files compatible with MS Excel 97/2000/XP/2003 XLS files, on any platform.\nDataNitro - DataNitro also offers full-featured Python-Excel integration, including UDFs. Trial downloads are available, but users must purchase a license.\nxlloop - XLLoop is an open source framework for implementing Excel user-defined functions (UDFs) on a centralised server (a function server).\nexpy - The ExPy add-in allows easy use of Python directly from within an Microsoft Excel spreadsheet, both to execute arbitrary code and to define new Excel functions.\npyxll - PyXLL is an Excel add-in that enables you to extend Excel using nothing but Python code.\n\n\n\nVisualization\n\nD-Tale - Visualizer for pandas dataframes and xarray datasets.\nmplfinance - matplotlib utilities for the visualization, and visual analysis, of financial data.\nfinplot - Performant and effortless finance plotting for Python.\nfinvizfinance - Finviz analysis python library.\nmarket-analy - Analysis and interactive charting using market-prices and bqplot." }, { "objectID": "index.html#r", "href": "index.html#r", "title": "Awesome Quant", "section": "R", - "text": "R\n\nNumerical Libraries & Data Structures\n\nxts - eXtensible Time Series: Provide for uniform handling of R’s different time-based data classes by extending zoo, maximizing native format information preservation and allowing for user level customization and extension, while simplifying cross-class interoperability.\ndata.table - Extension of data.frame: Fast aggregation of large data (e.g. 100GB in RAM), fast ordered joins, fast add/modify/delete of columns by group using no copies at all, list columns and a fast file reader (fread). Offers a natural and flexible syntax, for faster development.\nsparseEigen - Sparse pricipal component analysis.\nTSdbi - Provides a common interface to time series databases.\ntseries - Time Series Analysis and Computational Finance.\nzoo - S3 Infrastructure for Regular and Irregular Time Series (Z’s Ordered Observations).\ntis - Functions and S3 classes for time indexes and time indexed series, which are compatible with FAME frequencies.\ntfplot - Utilities for simple manipulation and quick plotting of time series data.\ntframe - A kernel of functions for programming time series methods in a way that is relatively independently of the representation of time.\n\n\n\nData Sources\n\nIBrokers - Provides native R access to Interactive Brokers Trader Workstation API.\nRblpapi - An R Interface to ‘Bloomberg’ is provided via the ‘Blp API’.\nQuandl - Get Financial Data Directly Into R.\nRbitcoin - Unified markets API interface (bitstamp, kraken, btce, bitmarket).\nGetTDData - Downloads and aggregates data for Brazilian government issued bonds directly from the website of Tesouro Direto.\nGetHFData - Downloads and aggregates high frequency trading data for Brazilian instruments directly from Bovespa ftp site.\nReddit WallstreetBets API - Provides daily top 50 stocks from reddit (subreddit) Wallstreetbets and their sentiments via the API.\ntd - Interfaces the ‘twelvedata’ API for stocks and (digital and standard) currencies.\nrbcb - R interface to Brazilian Central Bank web services.\n\n\n\nFinancial Instruments and Pricing\n\nRQuantLib - RQuantLib connects GNU R with QuantLib.\nquantmod - Quantitative Financial Modelling Framework.\nRmetrics - The premier open source software solution for teaching and training quantitative finance.\n\nfAsianOptions - EBM and Asian Option Valuation.\nfAssets - Analysing and Modelling Financial Assets.\nfBasics - Markets and Basic Statistics.\nfBonds - Bonds and Interest Rate Models.\nfExoticOptions - Exotic Option Valuation.\nfOptions - Pricing and Evaluating Basic Options.\nfPortfolio - Portfolio Selection and Optimization.\n\nportfolio - Analysing equity portfolios.\nsparseIndexTracking - Portfolio design to track an index.\ncovFactorModel - Covariance matrix estimation via factor models.\nriskParityPortfolio - Blazingly fast design of risk parity portfolios.\nsde - Simulation and Inference for Stochastic Differential Equations.\nYieldCurve - Modelling and estimation of the yield curve.\nSmithWilsonYieldCurve - Constructs a yield curve by the Smith-Wilson method from a table of LIBOR and SWAP rates.\nycinterextra - Yield curve or zero-coupon prices interpolation and extrapolation.\nAmericanCallOpt - This package includes pricing function for selected American call options with underlying assets that generate payouts.\nVarSwapPrice - Pricing a variance swap on an equity index.\nRND - Risk Neutral Density Extraction Package.\nLSMonteCarlo - American options pricing with Least Squares Monte Carlo method.\nOptHedging - Estimation of value and hedging strategy of call and put options.\ntvm - Time Value of Money Functions.\nOptionPricing - Option Pricing with Efficient Simulation Algorithms.\ncredule - Credit Default Swap Functions.\nderivmkts - Functions and R Code to Accompany Derivatives Markets.\nFinCal - Package for time value of money calculation, time series analysis and computational finance.\nr-quant - R code for quantitative analysis in finance.\noptions.studies - options trading studies functions for use with options.data package and shiny.\nPortfolioAnalytics - Portfolio Analysis, Including Numerical Methods for Optimizationof Portfolios.\nfmbasics - Financial Market Building Blocks.\nR-fixedincome - Fixed income tools for R.\n\n\n\nTrading\n\nbacktest - Exploring Portfolio-Based Conjectures About Financial Instruments.\npa - Performance Attribution for Equity Portfolios.\nTTR - Technical Trading Rules.\nQuantTools - Enhanced Quantitative Trading Modelling.\nblotter - Transaction infrastructure for defining instruments, transactions, portfolios and accounts for trading systems and simulation. Provides portfolio support for multi-asset class and multi-currency portfolios. Actively maintained and developed.\n\n\n\nBacktesting\n\nquantstrat - Transaction-oriented infrastructure for constructing trading systems and simulation. Provides support for multi-asset class and multi-currency portfolios for backtesting and other financial research.\n\n\n\nRisk Analysis\n\nPerformanceAnalytics - Econometric tools for performance and risk analysis.\n\n\n\nFactor Analysis\n\nFactorAnalytics - The FactorAnalytics package contains fitting and analysis methods for the three main types of factor models used in conjunction with portfolio construction, optimization and risk management, namely fundamental factor models, time series factor models and statistical factor models.\nExpected Returns - Solutions for enhancing portfolio diversification and replications of seminal papers with R, most of which are discussed in one of the best investment references of the recent decade, Expected Returns: An Investors Guide to Harvesting Market Rewards by Antti Ilmanen.\n\n\n\nTime Series\n\ntseries - Time Series Analysis and Computational Finance.\nfGarch - Rmetrics - Autoregressive Conditional Heteroskedastic Modelling.\ntimeSeries - Rmetrics - Financial Time Series Objects.\nrugarch - Univariate GARCH Models.\nrmgarch - Multivariate GARCH Models.\ntidypredict - Run predictions inside the database https://tidypredict.netlify.com/.\ntidyquant - Bringing financial analysis to the tidyverse.\ntimetk - A toolkit for working with time series in R.\ntibbletime - Built on top of the tidyverse, tibbletime is an extension that allows for the creation of time aware tibbles through the setting of a time index.\nmatrixprofile - Time series data mining library built on top of the novel Matrix Profile data structure and algorithms.\ngarchmodels - A parsnip backend for GARCH models.\n\n\n\nCalendars\n\ntimeDate - Chronological and Calendar Objects\nbizdays - Business days calculations and utilities" + "text": "R\n\nNumerical Libraries & Data Structures\n\nxts - eXtensible Time Series: Provide for uniform handling of R’s different time-based data classes by extending zoo, maximizing native format information preservation and allowing for user level customization and extension, while simplifying cross-class interoperability.\ndata.table - Extension of data.frame: Fast aggregation of large data (e.g. 100GB in RAM), fast ordered joins, fast add/modify/delete of columns by group using no copies at all, list columns and a fast file reader (fread). Offers a natural and flexible syntax, for faster development.\nsparseEigen - Sparse pricipal component analysis.\nTSdbi - Provides a common interface to time series databases.\ntseries - Time Series Analysis and Computational Finance.\nzoo - S3 Infrastructure for Regular and Irregular Time Series (Z’s Ordered Observations).\ntis - Functions and S3 classes for time indexes and time indexed series, which are compatible with FAME frequencies.\ntfplot - Utilities for simple manipulation and quick plotting of time series data.\ntframe - A kernel of functions for programming time series methods in a way that is relatively independently of the representation of time.\n\n\n\nData Sources\n\nIBrokers - Provides native R access to Interactive Brokers Trader Workstation API.\nRblpapi - An R Interface to ‘Bloomberg’ is provided via the ‘Blp API’.\nQuandl - Get Financial Data Directly Into R.\nRbitcoin - Unified markets API interface (bitstamp, kraken, btce, bitmarket).\nGetTDData - Downloads and aggregates data for Brazilian government issued bonds directly from the website of Tesouro Direto.\nGetHFData - Downloads and aggregates high frequency trading data for Brazilian instruments directly from Bovespa ftp site.\nReddit WallstreetBets API - Provides daily top 50 stocks from reddit (subreddit) Wallstreetbets and their sentiments via the API.\ntd - Interfaces the ‘twelvedata’ API for stocks and (digital and standard) currencies.\nrbcb - R interface to Brazilian Central Bank web services.\nrb3 - A bunch of downloaders and parsers for data delivered from B3.\nsimfinapi - Makes ‘SimFin’ data (https://simfin.com/) easily accessible in R.\n\n\n\nFinancial Instruments and Pricing\n\nRQuantLib - RQuantLib connects GNU R with QuantLib.\nquantmod - Quantitative Financial Modelling Framework.\nRmetrics - The premier open source software solution for teaching and training quantitative finance.\n\nfAsianOptions - EBM and Asian Option Valuation.\nfAssets - Analysing and Modelling Financial Assets.\nfBasics - Markets and Basic Statistics.\nfBonds - Bonds and Interest Rate Models.\nfExoticOptions - Exotic Option Valuation.\nfOptions - Pricing and Evaluating Basic Options.\nfPortfolio - Portfolio Selection and Optimization.\n\nportfolio - Analysing equity portfolios.\nsparseIndexTracking - Portfolio design to track an index.\ncovFactorModel - Covariance matrix estimation via factor models.\nriskParityPortfolio - Blazingly fast design of risk parity portfolios.\nsde - Simulation and Inference for Stochastic Differential Equations.\nYieldCurve - Modelling and estimation of the yield curve.\nSmithWilsonYieldCurve - Constructs a yield curve by the Smith-Wilson method from a table of LIBOR and SWAP rates.\nycinterextra - Yield curve or zero-coupon prices interpolation and extrapolation.\nAmericanCallOpt - This package includes pricing function for selected American call options with underlying assets that generate payouts.\nVarSwapPrice - Pricing a variance swap on an equity index.\nRND - Risk Neutral Density Extraction Package.\nLSMonteCarlo - American options pricing with Least Squares Monte Carlo method.\nOptHedging - Estimation of value and hedging strategy of call and put options.\ntvm - Time Value of Money Functions.\nOptionPricing - Option Pricing with Efficient Simulation Algorithms.\ncredule - Credit Default Swap Functions.\nderivmkts - Functions and R Code to Accompany Derivatives Markets.\nFinCal - Package for time value of money calculation, time series analysis and computational finance.\nr-quant - R code for quantitative analysis in finance.\noptions.studies - options trading studies functions for use with options.data package and shiny.\nPortfolioAnalytics - Portfolio Analysis, Including Numerical Methods for Optimizationof Portfolios.\nfmbasics - Financial Market Building Blocks.\nR-fixedincome - Fixed income tools for R.\n\n\n\nTrading\n\nbacktest - Exploring Portfolio-Based Conjectures About Financial Instruments.\npa - Performance Attribution for Equity Portfolios.\nTTR - Technical Trading Rules.\nQuantTools - Enhanced Quantitative Trading Modelling.\nblotter - Transaction infrastructure for defining instruments, transactions, portfolios and accounts for trading systems and simulation. Provides portfolio support for multi-asset class and multi-currency portfolios. Actively maintained and developed.\n\n\n\nBacktesting\n\nquantstrat - Transaction-oriented infrastructure for constructing trading systems and simulation. Provides support for multi-asset class and multi-currency portfolios for backtesting and other financial research.\n\n\n\nRisk Analysis\n\nPerformanceAnalytics - Econometric tools for performance and risk analysis.\n\n\n\nFactor Analysis\n\nFactorAnalytics - The FactorAnalytics package contains fitting and analysis methods for the three main types of factor models used in conjunction with portfolio construction, optimization and risk management, namely fundamental factor models, time series factor models and statistical factor models.\nExpected Returns - Solutions for enhancing portfolio diversification and replications of seminal papers with R, most of which are discussed in one of the best investment references of the recent decade, Expected Returns: An Investors Guide to Harvesting Market Rewards by Antti Ilmanen.\n\n\n\nTime Series\n\ntseries - Time Series Analysis and Computational Finance.\nfGarch - Rmetrics - Autoregressive Conditional Heteroskedastic Modelling.\ntimeSeries - Rmetrics - Financial Time Series Objects.\nrugarch - Univariate GARCH Models.\nrmgarch - Multivariate GARCH Models.\ntidypredict - Run predictions inside the database https://tidypredict.netlify.com/.\ntidyquant - Bringing financial analysis to the tidyverse.\ntimetk - A toolkit for working with time series in R.\ntibbletime - Built on top of the tidyverse, tibbletime is an extension that allows for the creation of time aware tibbles through the setting of a time index.\nmatrixprofile - Time series data mining library built on top of the novel Matrix Profile data structure and algorithms.\ngarchmodels - A parsnip backend for GARCH models.\n\n\n\nCalendars\n\ntimeDate - Chronological and Calendar Objects\nbizdays - Business days calculations and utilities" }, { "objectID": "index.html#matlab", @@ -88,7 +88,7 @@ "href": "index.html#julia", "title": "Awesome Quant", "section": "Julia", - "text": "Julia\n\nQuantLib.jl - Quantlib implementation in pure Julia.\nIto.jl - A Julia package for quantitative finance.\nTALib.jl - A Julia wrapper for TA-Lib.\nMiletus.jl - A financial contract definition, modeling language, and valuation framework.\nTemporal.jl - Flexible and efficient time series class & methods.\nIndicators.jl - Financial market technical analysis & indicators on top of Temporal.\nStrategems.jl - Quantitative systematic trading strategy development and backtesting.\nTimeSeries.jl - Time series toolkit for Julia.\nMarketTechnicals.jl - Technical analysis of financial time series on top of TimeSeries.\nMarketData.jl - Time series market data.\nTimeFrames.jl - A Julia library that defines TimeFrame (essentially for resampling TimeSeries)." + "text": "Julia\n\nQuantLib.jl - Quantlib implementation in pure Julia.\nIto.jl - A Julia package for quantitative finance.\nTALib.jl - A Julia wrapper for TA-Lib.\nMiletus.jl - A financial contract definition, modeling language, and valuation framework.\nTemporal.jl - Flexible and efficient time series class & methods.\nIndicators.jl - Financial market technical analysis & indicators on top of Temporal.\nStrategems.jl - Quantitative systematic trading strategy development and backtesting.\nTimeSeries.jl - Time series toolkit for Julia.\nMarketTechnicals.jl - Technical analysis of financial time series on top of TimeSeries.\nMarketData.jl - Time series market data.\nTimeFrames.jl - A Julia library that defines TimeFrame (essentially for resampling TimeSeries).\nDataFrames.jl - In-memory tabular data in Julia\nTSFrames.jl - Handle timeseries data on top of the powerful and mature DataFrames.jl" }, { "objectID": "index.html#java", @@ -102,14 +102,14 @@ "href": "index.html#javascript", "title": "Awesome Quant", "section": "JavaScript", - "text": "JavaScript\n\nfinance.js - A JavaScript library for common financial calculations.\nportfolio-allocation - PortfolioAllocation is a JavaScript library designed to help constructing financial portfolios made of several assets: bonds, commodities, cryptocurrencies, currencies, exchange traded funds (ETFs), mutual funds, stocks…\nGhostfolio - Wealth management software to keep track of financial assets like stocks, ETFs or cryptocurrencies and make solid, data-driven investment decisions.\nIndicatorTS - Indicator is a TypeScript module providing various stock technical analysis indicators, strategies, and a backtest framework for trading.\nccxt - A JavaScript / Python / PHP cryptocurrency trading API with support for more than 100 bitcoin/altcoin exchanges.\n\n\nData Visualization\n\nQUANTAXIS_Webkit - An awesome visualization center based on quantaxis." + "text": "JavaScript\n\nfinance.js - A JavaScript library for common financial calculations.\nportfolio-allocation - PortfolioAllocation is a JavaScript library designed to help constructing financial portfolios made of several assets: bonds, commodities, cryptocurrencies, currencies, exchange traded funds (ETFs), mutual funds, stocks…\nGhostfolio - Wealth management software to keep track of financial assets like stocks, ETFs or cryptocurrencies and make solid, data-driven investment decisions.\nIndicatorTS - Indicator is a TypeScript module providing various stock technical analysis indicators, strategies, and a backtest framework for trading.\nccxt - A JavaScript / Python / PHP cryptocurrency trading API with support for more than 100 bitcoin/altcoin exchanges.\nPENDAX - Javascript SDK for Trading/Data API and Websockets for FTX, FTXUS, OKX, Bybit, & More.\nMida - The open-source and cross-platform trading framework (https://www.mida.org/).\n\n\nData Visualization\n\nQUANTAXIS_Webkit - An awesome visualization center based on quantaxis." }, { "objectID": "index.html#haskell", "href": "index.html#haskell", "title": "Awesome Quant", "section": "Haskell", - "text": "Haskell\n\nquantfin - quant finance in pure haskell.\nhqfl - Haskell Quantitative Finance Library.\nHaxcel - Excel Addin for Haskell.\nFfinar - A financial maths library in Haskell." + "text": "Haskell\n\nquantfin - quant finance in pure haskell.\nHaxcel - Excel Addin for Haskell.\nFfinar - A financial maths library in Haskell." }, { "objectID": "index.html#scala", @@ -151,7 +151,7 @@ "href": "index.html#frameworks-1", "title": "Awesome Quant", "section": "Frameworks", - "text": "Frameworks\n\nQuantLib - The QuantLib project is aimed at providing a comprehensive software framework for quantitative finance.\n\nJQuantLib - Java port.\nRQuantLib - R port.\nQuantLibAddin - Excel support.\nQuantLibXL - Excel support.\nQLNet - .Net port.\nPyQL - Python port.\nQuantLib.jl - Julia port.\n\nTA-Lib - perform technical analysis of financial market data.\nPortfolio Optimizer - Portfolio Optimizer is a Web API for portfolio analysis and optimization." + "text": "Frameworks\n\nQuantLib - The QuantLib project is aimed at providing a comprehensive software framework for quantitative finance.\n\nJQuantLib - Java port.\nRQuantLib - R port.\nQuantLibAddin - Excel support.\nQuantLibXL - Excel support.\nQLNet - .Net port.\nPyQL - Python port.\nQuantLib.jl - Julia port.\nQuantLib-Python Documentation - Documentation for the Python bindings for the QuantLib library\n\nTA-Lib - perform technical analysis of financial market data.\n\nta-lib-python\nta-lib\n\nPortfolio Optimizer - Portfolio Optimizer is a Web API for portfolio analysis and optimization." }, { "objectID": "index.html#csharp", @@ -165,14 +165,14 @@ "href": "index.html#rust", "title": "Awesome Quant", "section": "Rust", - "text": "Rust\n\nQuantMath - Financial maths library for risk-neutral pricing and risk" + "text": "Rust\n\nQuantMath - Financial maths library for risk-neutral pricing and risk\nBarter - Open-source Rust framework for building event-driven live-trading & backtesting systems\nLFEST - Simulated perpetual futures exchange to trade your strategy against.\nTradeAggregation - Aggregate trades into user-defined candles using information driven rules.\nSlidingFeatures - Chainable tree-like sliding windows for signal processing and technical analysis.\nRustQuant - Quantitative finance library written in Rust." }, { "objectID": "index.html#reproducing-works-training-books", "href": "index.html#reproducing-works-training-books", "title": "Awesome Quant", "section": "Reproducing Works, Training & Books", - "text": "Reproducing Works, Training & Books\n\nDerman Papers - Notebooks that replicate original quantitative finance papers from Emanuel Derman.\nML-Quant - Top Quant resources like ArXiv (sanity), SSRN, RePec, Journals, Podcasts, Videos, and Blogs.\nvolatility-trading - A complete set of volatility estimators based on Euan Sinclair’s Volatility Trading.\nquant - Quantitative Finance and Algorithmic Trading exhaust; mostly ipython notebooks based on Quantopian, Zipline, or Pandas.\nfecon235 - Open source project for software tools in financial economics. Many jupyter notebook to verify theoretical ideas and practical methods interactively.\nQuantitative-Notebooks - Educational notebooks on quantitative finance, algorithmic trading, financial modelling and investment strategy\nQuantEcon - Lecture series on economics, finance, econometrics and data science; QuantEcon.py, QuantEcon.jl, notebooks\nFinanceHub - Resources for Quantitative Finance\nPython_Option_Pricing - An libary to price financial options written in Python. Includes: Black Scholes, Black 76, Implied Volatility, American, European, Asian, Spread Options.\npython-training - J.P. Morgan’s Python training for business analysts and traders.\nStock_Analysis_For_Quant - Different Types of Stock Analysis in Excel, Matlab, Power BI, Python, R, and Tableau.\nalgorithmic-trading-with-python - Source code for Algorithmic Trading with Python (2020) by Chris Conlan.\nMEDIUM_NoteBook - Repository containing notebooks of cerlymarco’s posts on Medium.\nQuantFinance - Training materials in quantitative finance.\nMarketAnalysis - Implementing many different methods and popular analysis tools in Python.\nIPythonScripts - Tutorials about Quantitative Finance in Python and QuantLib: Pricing, xVAs, Hedging, Portfolio Optimisation, Machine Learning and Deep Learning.\nComputational-Finance-Course - Materials for the course of Computational Finance.\nMachine-Learning-for-Asset-Managers - Implementation of code snippets, exercises and application to live data from Machine Learning for Asset Managers (Elements in Quantitative Finance) written by Prof. Marcos López de Prado.\nPython-for-Finance-Cookbook - Python for Finance Cookbook, published by Packt.\nmodelos_vol_derivativos - “Modelos de Volatilidade para Derivativos” book’s Jupyter notebooks\nNMOF - Functions, examples and data from the first and the second edition of “Numerical Methods and Optimization in Finance” by M. Gilli, D. Maringer and E. Schumann (2019, ISBN:978-0128150658).\npy4fi2nd - Jupyter Notebooks and code for Python for Finance (2nd ed., O’Reilly) by Yves Hilpisch.\naiif - Jupyter Notebooks and code for the book Artificial Intelligence in Finance (O’Reilly) by Yves Hilpisch.\npy4at - Jupyter Notebooks and code for the book Python for Algorithmic Trading (O’Reilly) by Yves Hilpisch.\ndawp - Jupyter Notebooks and code for Derivatives Analytics with Python (Wiley Finance) by Yves Hilpisch.\ndx - DX Analytics | Financial and Derivatives Analytics with Python.\nQuantFinanceBook - Quantitative Finance book.\nrough_bergomi - A Python implementation of the rough Bergomi model.\nfrh-fx - A python implementation of the fast-reversion Heston model of Mechkov for FX purposes.\nvalue-investing-studies - A collection of data analysis studies that examine the performance and characteristics of value investing over long periods of time.\nmachine-learning-asset-management - Machine Learning in Asset Management (by @firmai).\nDeep-Learning-Machine-Learning-Stock - Deep Learning and Machine Learning stocks represent a promising long-term or short-term opportunity for investors and traders.\nTechnical_Analysis_and_Feature_Engineering - Feature Engineering and Feature Importance of Machine Learning in Financial Market." + "text": "Reproducing Works, Training & Books\n\nDerman Papers - Notebooks that replicate original quantitative finance papers from Emanuel Derman.\nML-Quant - Top Quant resources like ArXiv (sanity), SSRN, RePec, Journals, Podcasts, Videos, and Blogs.\nvolatility-trading - A complete set of volatility estimators based on Euan Sinclair’s Volatility Trading.\nquant - Quantitative Finance and Algorithmic Trading exhaust; mostly ipython notebooks based on Quantopian, Zipline, or Pandas.\nfecon235 - Open source project for software tools in financial economics. Many jupyter notebook to verify theoretical ideas and practical methods interactively.\nQuantitative-Notebooks - Educational notebooks on quantitative finance, algorithmic trading, financial modelling and investment strategy\nQuantEcon - Lecture series on economics, finance, econometrics and data science; QuantEcon.py, QuantEcon.jl, notebooks\nFinanceHub - Resources for Quantitative Finance\nPython_Option_Pricing - An libary to price financial options written in Python. Includes: Black Scholes, Black 76, Implied Volatility, American, European, Asian, Spread Options.\npython-training - J.P. Morgan’s Python training for business analysts and traders.\nStock_Analysis_For_Quant - Different Types of Stock Analysis in Excel, Matlab, Power BI, Python, R, and Tableau.\nalgorithmic-trading-with-python - Source code for Algorithmic Trading with Python (2020) by Chris Conlan.\nMEDIUM_NoteBook - Repository containing notebooks of cerlymarco’s posts on Medium.\nQuantFinance - Training materials in quantitative finance.\nIPythonScripts - Tutorials about Quantitative Finance in Python and QuantLib: Pricing, xVAs, Hedging, Portfolio Optimisation, Machine Learning and Deep Learning.\nComputational-Finance-Course - Materials for the course of Computational Finance.\nMachine-Learning-for-Asset-Managers - Implementation of code snippets, exercises and application to live data from Machine Learning for Asset Managers (Elements in Quantitative Finance) written by Prof. Marcos López de Prado.\nPython-for-Finance-Cookbook - Python for Finance Cookbook, published by Packt.\nmodelos_vol_derivativos - “Modelos de Volatilidade para Derivativos” book’s Jupyter notebooks\nNMOF - Functions, examples and data from the first and the second edition of “Numerical Methods and Optimization in Finance” by M. Gilli, D. Maringer and E. Schumann (2019, ISBN:978-0128150658).\npy4fi2nd - Jupyter Notebooks and code for Python for Finance (2nd ed., O’Reilly) by Yves Hilpisch.\naiif - Jupyter Notebooks and code for the book Artificial Intelligence in Finance (O’Reilly) by Yves Hilpisch.\npy4at - Jupyter Notebooks and code for the book Python for Algorithmic Trading (O’Reilly) by Yves Hilpisch.\ndawp - Jupyter Notebooks and code for Derivatives Analytics with Python (Wiley Finance) by Yves Hilpisch.\ndx - DX Analytics | Financial and Derivatives Analytics with Python.\nQuantFinanceBook - Quantitative Finance book.\nrough_bergomi - A Python implementation of the rough Bergomi model.\nfrh-fx - A python implementation of the fast-reversion Heston model of Mechkov for FX purposes.\nValue Investing Studies - A collection of data analysis studies that examine the performance and characteristics of value investing over long periods of time.\nMachine Learning Asset Management - Machine Learning in Asset Management (by @firmai).\nDeep Learning Machine Learning Stock - Deep Learning and Machine Learning stocks represent a promising long-term or short-term opportunity for investors and traders.\nTechnical Analysis and Feature Engineering - Feature Engineering and Feature Importance of Machine Learning in Financial Market.\nDifferential Machine Learning and Axes that matter by Brian Huge and Antoine Savine - Implement, demonstrate, reproduce and extend the results of the Risk articles ‘Differential Machine Learning’ (2020) and ‘PCA with a Difference’ (2021) by Huge and Savine, and cover implementation details left out from the papers.\nsystematictradingexamples - Examples of code related to book Systematic Trading and blog\npysystemtrade_examples - Examples using pysystemtrade for Robert Carver’s blog.\nML_Finance_Codes - Machine Learning in Finance: From Theory to Practice Book\nHands-On Machine Learning for Algorithmic Trading - Hands-On Machine Learning for Algorithmic Trading, published by Packt\nfinancialnoob-misc - Codes from @financialnoob’s posts" }, { "objectID": "projects.html", diff --git a/docs/site_libs/pagedtable-1.1/css/pagedtable.css b/docs/site_libs/pagedtable-1.1/css/pagedtable.css deleted file mode 100644 index 8764d88..0000000 --- a/docs/site_libs/pagedtable-1.1/css/pagedtable.css +++ /dev/null @@ -1,142 +0,0 @@ -.pagedtable { - overflow: auto; - padding-left: 8px; - padding-right: 8px; -} - -.pagedtable-wrapper { - border: 1px solid #ccc; - border-radius: 4px; - margin-bottom: 10px; -} - -.pagedtable table { - width: 100%; - max-width: 100%; - margin: 0; -} - -.pagedtable th { - padding: 0 5px 0 5px; - border: none; - border-bottom: 2px solid #dddddd; - - min-width: 45px; -} - -.pagedtable-empty th { - display: none; -} - -.pagedtable td { - padding: 0 4px 0 4px; -} - -.pagedtable .even { - background-color: rgba(140, 140, 140, 0.1); -} - -.pagedtable-padding-col { - display: none; -} - -.pagedtable a { - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.pagedtable-index-nav { - cursor: pointer; - padding: 0 5px 0 5px; - float: right; - border: 0; -} - -.pagedtable-index-nav-disabled { - cursor: default; - text-decoration: none; - color: #999; -} - -a.pagedtable-index-nav-disabled:hover { - text-decoration: none; - color: #999; -} - -.pagedtable-indexes { - cursor: pointer; - float: right; - border: 0; -} - -.pagedtable-index-current { - cursor: default; - text-decoration: none; - font-weight: bold; - color: #333; - border: 0; -} - -a.pagedtable-index-current:hover { - text-decoration: none; - font-weight: bold; - color: #333; -} - -.pagedtable-index { - width: 30px; - display: inline-block; - text-align: center; - border: 0; -} - -.pagedtable-index-separator-left { - display: inline-block; - color: #333; - font-size: 9px; - padding: 0 0 0 0; - cursor: default; -} - -.pagedtable-index-separator-right { - display: inline-block; - color: #333; - font-size: 9px; - padding: 0 4px 0 0; - cursor: default; -} - -.pagedtable-footer { - padding-top: 4px; - padding-bottom: 5px; -} - -.pagedtable-not-empty .pagedtable-footer { - border-top: 2px solid #dddddd; -} - -.pagedtable-info { - overflow: hidden; - color: #999; - white-space: nowrap; - text-overflow: ellipsis; -} - -.pagedtable-header-name { - overflow: hidden; - text-overflow: ellipsis; -} - -.pagedtable-header-type { - color: #999; - font-weight: 400; -} - -.pagedtable-na-cell { - font-style: italic; - opacity: 0.3; -} diff --git a/docs/site_libs/pagedtable-1.1/js/pagedtable.js b/docs/site_libs/pagedtable-1.1/js/pagedtable.js deleted file mode 100644 index 52ada2b..0000000 --- a/docs/site_libs/pagedtable-1.1/js/pagedtable.js +++ /dev/null @@ -1,1151 +0,0 @@ -// Production steps of ECMA-262, Edition 5, 15.4.4.18 -// Reference: http://es5.github.io/#x15.4.4.18 -if (!Array.prototype.forEach) { - - Array.prototype.forEach = function(callback, thisArg) { - - var T, k; - - if (this === null) { - throw new TypeError(' this is null or not defined'); - } - - // 1. Let O be the result of calling toObject() passing the - // |this| value as the argument. - var O = Object(this); - - // 2. Let lenValue be the result of calling the Get() internal - // method of O with the argument "length". - // 3. Let len be toUint32(lenValue). - var len = O.length >>> 0; - - // 4. If isCallable(callback) is false, throw a TypeError exception. - // See: http://es5.github.com/#x9.11 - if (typeof callback !== "function") { - throw new TypeError(callback + ' is not a function'); - } - - // 5. If thisArg was supplied, let T be thisArg; else let - // T be undefined. - if (arguments.length > 1) { - T = thisArg; - } - - // 6. Let k be 0 - k = 0; - - // 7. Repeat, while k < len - while (k < len) { - - var kValue; - - // a. Let Pk be ToString(k). - // This is implicit for LHS operands of the in operator - // b. Let kPresent be the result of calling the HasProperty - // internal method of O with argument Pk. - // This step can be combined with c - // c. If kPresent is true, then - if (k in O) { - - // i. Let kValue be the result of calling the Get internal - // method of O with argument Pk. - kValue = O[k]; - - // ii. Call the Call internal method of callback with T as - // the this value and argument list containing kValue, k, and O. - callback.call(T, kValue, k, O); - } - // d. Increase k by 1. - k++; - } - // 8. return undefined - }; -} - -// Production steps of ECMA-262, Edition 5, 15.4.4.19 -// Reference: http://es5.github.io/#x15.4.4.19 -if (!Array.prototype.map) { - - Array.prototype.map = function(callback, thisArg) { - - var T, A, k; - - if (this == null) { - throw new TypeError(' this is null or not defined'); - } - - // 1. Let O be the result of calling ToObject passing the |this| - // value as the argument. - var O = Object(this); - - // 2. Let lenValue be the result of calling the Get internal - // method of O with the argument "length". - // 3. Let len be ToUint32(lenValue). - var len = O.length >>> 0; - - // 4. If IsCallable(callback) is false, throw a TypeError exception. - // See: http://es5.github.com/#x9.11 - if (typeof callback !== 'function') { - throw new TypeError(callback + ' is not a function'); - } - - // 5. If thisArg was supplied, let T be thisArg; else let T be undefined. - if (arguments.length > 1) { - T = thisArg; - } - - // 6. Let A be a new array created as if by the expression new Array(len) - // where Array is the standard built-in constructor with that name and - // len is the value of len. - A = new Array(len); - - // 7. Let k be 0 - k = 0; - - // 8. Repeat, while k < len - while (k < len) { - - var kValue, mappedValue; - - // a. Let Pk be ToString(k). - // This is implicit for LHS operands of the in operator - // b. Let kPresent be the result of calling the HasProperty internal - // method of O with argument Pk. - // This step can be combined with c - // c. If kPresent is true, then - if (k in O) { - - // i. Let kValue be the result of calling the Get internal - // method of O with argument Pk. - kValue = O[k]; - - // ii. Let mappedValue be the result of calling the Call internal - // method of callback with T as the this value and argument - // list containing kValue, k, and O. - mappedValue = callback.call(T, kValue, k, O); - - // iii. Call the DefineOwnProperty internal method of A with arguments - // Pk, Property Descriptor - // { Value: mappedValue, - // Writable: true, - // Enumerable: true, - // Configurable: true }, - // and false. - - // In browsers that support Object.defineProperty, use the following: - // Object.defineProperty(A, k, { - // value: mappedValue, - // writable: true, - // enumerable: true, - // configurable: true - // }); - - // For best browser support, use the following: - A[k] = mappedValue; - } - // d. Increase k by 1. - k++; - } - - // 9. return A - return A; - }; -} - -var PagedTable = function (pagedTable) { - var me = this; - - var source = function(pagedTable) { - var sourceElems = [].slice.call(pagedTable.children).filter(function(e) { - return e.hasAttribute("data-pagedtable-source"); - }); - - if (sourceElems === null || sourceElems.length !== 1) { - throw("A single data-pagedtable-source was not found"); - } - - return JSON.parse(sourceElems[0].innerHTML); - }(pagedTable); - - var options = function(source) { - var options = typeof(source.options) !== "undefined" && - source.options !== null ? source.options : {}; - - var columns = typeof(options.columns) !== "undefined" ? options.columns : {}; - var rows = typeof(options.rows) !== "undefined" ? options.rows : {}; - - var positiveIntOrNull = function(value) { - return parseInt(value) >= 0 ? parseInt(value) : null; - }; - - return { - pages: positiveIntOrNull(options.pages), - rows: { - min: positiveIntOrNull(rows.min), - max: positiveIntOrNull(rows.max), - total: positiveIntOrNull(rows.total) - }, - columns: { - min: positiveIntOrNull(columns.min), - max: positiveIntOrNull(columns.max), - total: positiveIntOrNull(columns.total) - } - }; - }(source); - - var Measurer = function() { - - // set some default initial values that will get adjusted in runtime - me.measures = { - padding: 12, - character: 8, - height: 15, - defaults: true - }; - - me.calculate = function(measuresCell) { - if (!me.measures.defaults) - return; - - var measuresCellStyle = window.getComputedStyle(measuresCell, null); - - var newPadding = parsePadding(measuresCellStyle.paddingLeft) + - parsePadding(measuresCellStyle.paddingRight); - - var sampleString = "ABCDEFGHIJ0123456789"; - var newCharacter = Math.ceil(measuresCell.clientWidth / sampleString.length); - - if (newPadding <= 0 || newCharacter <= 0) - return; - - me.measures.padding = newPadding; - me.measures.character = newCharacter; - me.measures.height = measuresCell.clientHeight; - me.measures.defaults = false; - }; - - return me; - }; - - var Page = function(data, options) { - var me = this; - - var defaults = { - max: 7, - rows: 10 - }; - - var totalPages = function() { - return Math.ceil(data.length / me.rows); - }; - - me.number = 0; - me.max = options.pages !== null ? options.pages : defaults.max; - me.visible = me.max; - me.rows = options.rows.min !== null ? options.rows.min : defaults.rows; - me.total = totalPages(); - - me.setRows = function(newRows) { - me.rows = newRows; - me.total = totalPages(); - }; - - me.setPageNumber = function(newPageNumber) { - if (newPageNumber < 0) newPageNumber = 0; - if (newPageNumber >= me.total) newPageNumber = me.total - 1; - - me.number = newPageNumber; - }; - - me.setVisiblePages = function(visiblePages) { - me.visible = Math.min(me.max, visiblePages); - me.setPageNumber(me.number); - }; - - me.getVisiblePageRange = function() { - var start = me.number - Math.max(Math.floor((me.visible - 1) / 2), 0); - var end = me.number + Math.floor(me.visible / 2) + 1; - var pageCount = me.total; - - if (start < 0) { - var diffToStart = 0 - start; - start += diffToStart; - end += diffToStart; - } - - if (end > pageCount) { - var diffToEnd = end - pageCount; - start -= diffToEnd; - end -= diffToEnd; - } - - start = start < 0 ? 0 : start; - end = end >= pageCount ? pageCount : end; - - var first = false; - var last = false; - - if (start > 0 && me.visible > 1) { - start = start + 1; - first = true; - } - - if (end < pageCount && me.visible > 2) { - end = end - 1; - last = true; - } - - return { - first: first, - start: start, - end: end, - last: last - }; - }; - - me.getRowStart = function() { - var rowStart = page.number * page.rows; - if (rowStart < 0) - rowStart = 0; - - return rowStart; - }; - - me.getRowEnd = function() { - var rowStart = me.getRowStart(); - return Math.min(rowStart + me.rows, data.length); - }; - - me.getPaddingRows = function() { - var rowStart = me.getRowStart(); - var rowEnd = me.getRowEnd(); - return data.length > me.rows ? me.rows - (rowEnd - rowStart) : 0; - }; - }; - - var Columns = function(data, columns, options) { - var me = this; - - me.defaults = { - min: 5 - }; - - me.number = 0; - me.visible = 0; - me.total = columns.length; - me.subset = []; - me.padding = 0; - me.min = options.columns.min !== null ? options.columns.min : me.defaults.min; - me.max = options.columns.max !== null ? options.columns.max : null; - me.widths = {}; - - var widthsLookAhead = Math.max(100, options.rows.min); - var paddingColChars = 10; - - me.emptyNames = function() { - columns.forEach(function(column) { - if (columns.label !== null && columns.label !== "") - return false; - }); - - return true; - }; - - var parsePadding = function(value) { - return parseInt(value) >= 0 ? parseInt(value) : 0; - }; - - me.calculateWidths = function(measures) { - columns.forEach(function(column) { - var maxChars = Math.max( - column.label.toString().length, - column.type.toString().length - ); - - for (var idxRow = 0; idxRow < Math.min(widthsLookAhead, data.length); idxRow++) { - maxChars = Math.max(maxChars, data[idxRow][column.name.toString()].length); - } - - me.widths[column.name] = { - // width in characters - chars: maxChars, - // width for the inner html columns - inner: maxChars * measures.character, - // width adding outer styles like padding - outer: maxChars * measures.character + measures.padding - }; - }); - }; - - me.getWidth = function() { - var widthOuter = 0; - for (var idxCol = 0; idxCol < me.subset.length; idxCol++) { - var columnName = me.subset[idxCol].name; - widthOuter = widthOuter + me.widths[columnName].outer; - } - - widthOuter = widthOuter + me.padding * paddingColChars * measurer.measures.character; - - if (me.hasMoreLeftColumns()) { - widthOuter = widthOuter + columnNavigationWidthPX + measurer.measures.padding; - } - - if (me.hasMoreRightColumns()) { - widthOuter = widthOuter + columnNavigationWidthPX + measurer.measures.padding; - } - - return widthOuter; - }; - - me.updateSlice = function() { - if (me.number + me.visible >= me.total) - me.number = me.total - me.visible; - - if (me.number < 0) me.number = 0; - - me.subset = columns.slice(me.number, Math.min(me.number + me.visible, me.total)); - - me.subset = me.subset.map(function(column) { - Object.keys(column).forEach(function(colKey) { - column[colKey] = column[colKey] === null ? "" : column[colKey].toString(); - }); - - column.width = null; - return column; - }); - }; - - me.setVisibleColumns = function(columnNumber, newVisibleColumns, paddingCount) { - me.number = columnNumber; - me.visible = newVisibleColumns; - me.padding = paddingCount; - - me.updateSlice(); - }; - - me.incColumnNumber = function(increment) { - me.number = me.number + increment; - }; - - me.setColumnNumber = function(newNumber) { - me.number = newNumber; - }; - - me.setPaddingCount = function(newPadding) { - me.padding = newPadding; - }; - - me.getPaddingCount = function() { - return me.padding; - }; - - me.hasMoreLeftColumns = function() { - return me.number > 0; - }; - - me.hasMoreRightColumns = function() { - return me.number + me.visible < me.total; - }; - - me.updateSlice(0); - return me; - }; - - var data = source.data; - var page = new Page(data, options); - var measurer = new Measurer(data, options); - var columns = new Columns(data, source.columns, options); - - var table = null; - var tableDiv = null; - var header = null; - var footer = null; - var tbody = null; - - // Caches pagedTable.clientWidth, specially for webkit - var cachedPagedTableClientWidth = null; - - var onChangeCallbacks = []; - - var clearSelection = function() { - if(document.selection && document.selection.empty) { - document.selection.empty(); - } else if(window.getSelection) { - var sel = window.getSelection(); - sel.removeAllRanges(); - } - }; - - var columnNavigationWidthPX = 5; - - var renderColumnNavigation = function(increment, backwards) { - var arrow = document.createElement("div"); - arrow.setAttribute("style", - "border-top: " + columnNavigationWidthPX + "px solid transparent;" + - "border-bottom: " + columnNavigationWidthPX + "px solid transparent;" + - "border-" + (backwards ? "right" : "left") + ": " + columnNavigationWidthPX + "px solid;"); - - var header = document.createElement("th"); - header.appendChild(arrow); - header.setAttribute("style", - "cursor: pointer;" + - "vertical-align: middle;" + - "min-width: " + columnNavigationWidthPX + "px;" + - "width: " + columnNavigationWidthPX + "px;"); - - header.onclick = function() { - columns.incColumnNumber(backwards ? -1 : increment); - - me.animateColumns(backwards); - renderFooter(); - - clearSelection(); - triggerOnChange(); - }; - - return header; - }; - - var maxColumnWidth = function(width) { - var padding = 80; - var columnMax = Math.max(cachedPagedTableClientWidth - padding, 0); - - return parseInt(width) > 0 ? - Math.min(columnMax, parseInt(width)) + "px" : - columnMax + "px"; - }; - - var clearHeader = function() { - var thead = pagedTable.querySelectorAll("thead")[0]; - thead.innerHTML = ""; - }; - - var renderHeader = function(clear) { - cachedPagedTableClientWidth = pagedTable.clientWidth; - - var fragment = document.createDocumentFragment(); - - header = document.createElement("tr"); - fragment.appendChild(header); - - if (columns.number > 0) - header.appendChild(renderColumnNavigation(-columns.visible, true)); - - columns.subset = columns.subset.map(function(columnData) { - var column = document.createElement("th"); - column.setAttribute("align", columnData.align); - column.style.textAlign = columnData.align; - - column.style.maxWidth = maxColumnWidth(null); - if (columnData.width) { - column.style.minWidth = - column.style.maxWidth = maxColumnWidth(columnData.width); - } - - var columnName = document.createElement("div"); - columnName.setAttribute("class", "pagedtable-header-name"); - if (columnData.label === "") { - columnName.innerHTML = " "; - } - else { - columnName.appendChild(document.createTextNode(columnData.label)); - } - column.appendChild(columnName); - - var columnType = document.createElement("div"); - columnType.setAttribute("class", "pagedtable-header-type"); - if (columnData.type === "") { - columnType.innerHTML = " "; - } - else { - columnType.appendChild(document.createTextNode("<" + columnData.type + ">")); - } - column.appendChild(columnType); - - header.appendChild(column); - - columnData.element = column; - - return columnData; - }); - - for (var idx = 0; idx < columns.getPaddingCount(); idx++) { - var paddingCol = document.createElement("th"); - paddingCol.setAttribute("class", "pagedtable-padding-col"); - header.appendChild(paddingCol); - } - - if (columns.number + columns.visible < columns.total) - header.appendChild(renderColumnNavigation(columns.visible, false)); - - if (typeof(clear) == "undefined" || clear) clearHeader(); - var thead = pagedTable.querySelectorAll("thead")[0]; - thead.appendChild(fragment); - }; - - me.animateColumns = function(backwards) { - var thead = pagedTable.querySelectorAll("thead")[0]; - - var headerOld = thead.querySelectorAll("tr")[0]; - var tbodyOld = table.querySelectorAll("tbody")[0]; - - me.fitColumns(backwards); - - renderHeader(false); - - header.style.opacity = "0"; - header.style.transform = backwards ? "translateX(-30px)" : "translateX(30px)"; - header.style.transition = "transform 200ms linear, opacity 200ms"; - header.style.transitionDelay = "0"; - - renderBody(false); - - if (headerOld) { - headerOld.style.position = "absolute"; - headerOld.style.transform = "translateX(0px)"; - headerOld.style.opacity = "1"; - headerOld.style.transition = "transform 100ms linear, opacity 100ms"; - headerOld.setAttribute("class", "pagedtable-remove-head"); - if (headerOld.style.transitionEnd) { - headerOld.addEventListener("transitionend", function() { - var headerOldByClass = thead.querySelector(".pagedtable-remove-head"); - if (headerOldByClass) thead.removeChild(headerOldByClass); - }); - } - else { - thead.removeChild(headerOld); - } - } - - if (tbodyOld) table.removeChild(tbodyOld); - - tbody.style.opacity = "0"; - tbody.style.transition = "transform 200ms linear, opacity 200ms"; - tbody.style.transitionDelay = "0ms"; - - // force relayout - window.getComputedStyle(header).opacity; - window.getComputedStyle(tbody).opacity; - - if (headerOld) { - headerOld.style.transform = backwards ? "translateX(20px)" : "translateX(-30px)"; - headerOld.style.opacity = "0"; - } - - header.style.transform = "translateX(0px)"; - header.style.opacity = "1"; - - tbody.style.opacity = "1"; - } - - me.onChange = function(callback) { - onChangeCallbacks.push(callback); - }; - - var triggerOnChange = function() { - onChangeCallbacks.forEach(function(onChange) { - onChange(); - }); - }; - - var clearBody = function() { - if (tbody) { - table.removeChild(tbody); - tbody = null; - } - }; - - var renderBody = function(clear) { - cachedPagedTableClientWidth = pagedTable.clientWidth - - var fragment = document.createDocumentFragment(); - - var pageData = data.slice(page.getRowStart(), page.getRowEnd()); - - pageData.forEach(function(dataRow, idxRow) { - var htmlRow = document.createElement("tr"); - htmlRow.setAttribute("class", (idxRow % 2 !==0) ? "even" : "odd"); - - if (columns.hasMoreLeftColumns()) - htmlRow.appendChild(document.createElement("td")); - - columns.subset.forEach(function(columnData) { - var cellName = columnData.name; - var dataCell = dataRow[cellName]; - var htmlCell = document.createElement("td"); - - if (dataCell === "NA") htmlCell.setAttribute("class", "pagedtable-na-cell"); - if (dataCell === "__NA__") dataCell = "NA"; - - var cellText = document.createTextNode(dataCell); - htmlCell.appendChild(cellText); - if (dataCell.length > 50) { - htmlCell.setAttribute("title", dataCell); - } - htmlCell.setAttribute("align", columnData.align); - htmlCell.style.textAlign = columnData.align; - htmlCell.style.maxWidth = maxColumnWidth(null); - if (columnData.width) { - htmlCell.style.minWidth = htmlCell.style.maxWidth = maxColumnWidth(columnData.width); - } - htmlRow.appendChild(htmlCell); - }); - - for (var idx = 0; idx < columns.getPaddingCount(); idx++) { - var paddingCol = document.createElement("td"); - paddingCol.setAttribute("class", "pagedtable-padding-col"); - htmlRow.appendChild(paddingCol); - } - - if (columns.hasMoreRightColumns()) - htmlRow.appendChild(document.createElement("td")); - - fragment.appendChild(htmlRow); - }); - - for (var idxPadding = 0; idxPadding < page.getPaddingRows(); idxPadding++) { - var paddingRow = document.createElement("tr"); - - var paddingCellRow = document.createElement("td"); - paddingCellRow.innerHTML = " "; - paddingCellRow.setAttribute("colspan", "100%"); - paddingRow.appendChild(paddingCellRow); - - fragment.appendChild(paddingRow); - } - - if (typeof(clear) == "undefined" || clear) clearBody(); - tbody = document.createElement("tbody"); - tbody.appendChild(fragment); - - table.appendChild(tbody); - }; - - var getLabelInfo = function() { - var pageStart = page.getRowStart(); - var pageEnd = page.getRowEnd(); - var totalRows = data.length; - - var totalRowsLabel = options.rows.total ? options.rows.total : totalRows; - var totalRowsLabelFormat = totalRowsLabel.toString().replace(/(\d)(?=(\d\d\d)+(?!\d))/g, '$1,'); - - var infoText = (pageStart + 1) + "-" + pageEnd + " of " + totalRowsLabelFormat + " rows"; - if (totalRows < page.rows) { - infoText = totalRowsLabel + " row" + (totalRows != 1 ? "s" : ""); - } - if (columns.total > columns.visible) { - var totalColumnsLabel = options.columns.total ? options.columns.total : columns.total; - - infoText = infoText + " | " + (columns.number + 1) + "-" + - (Math.min(columns.number + columns.visible, columns.total)) + - " of " + totalColumnsLabel + " columns"; - } - - return infoText; - }; - - var clearFooter = function() { - footer = pagedTable.querySelectorAll("div.pagedtable-footer")[0]; - footer.innerHTML = ""; - - return footer; - }; - - var createPageLink = function(idxPage) { - var pageLink = document.createElement("a"); - pageLinkClass = idxPage === page.number ? "pagedtable-index pagedtable-index-current" : "pagedtable-index"; - pageLink.setAttribute("class", pageLinkClass); - pageLink.setAttribute("data-page-index", idxPage); - pageLink.onclick = function() { - page.setPageNumber(parseInt(this.getAttribute("data-page-index"))); - renderBody(); - renderFooter(); - - triggerOnChange(); - }; - - pageLink.appendChild(document.createTextNode(idxPage + 1)); - - return pageLink; - } - - var renderFooter = function() { - footer = clearFooter(); - - var next = document.createElement("a"); - next.appendChild(document.createTextNode("Next")); - next.onclick = function() { - page.setPageNumber(page.number + 1); - renderBody(); - renderFooter(); - - triggerOnChange(); - }; - if (data.length > page.rows) footer.appendChild(next); - - var pageNumbers = document.createElement("div"); - pageNumbers.setAttribute("class", "pagedtable-indexes"); - - var pageRange = page.getVisiblePageRange(); - - if (pageRange.first) { - var pageLink = createPageLink(0); - pageNumbers.appendChild(pageLink); - - var pageSeparator = document.createElement("div"); - pageSeparator.setAttribute("class", "pagedtable-index-separator-left"); - pageSeparator.appendChild(document.createTextNode("...")) - pageNumbers.appendChild(pageSeparator); - } - - for (var idxPage = pageRange.start; idxPage < pageRange.end; idxPage++) { - var pageLink = createPageLink(idxPage); - - pageNumbers.appendChild(pageLink); - } - - if (pageRange.last) { - var pageSeparator = document.createElement("div"); - pageSeparator.setAttribute("class", "pagedtable-index-separator-right"); - pageSeparator.appendChild(document.createTextNode("...")) - pageNumbers.appendChild(pageSeparator); - - var pageLink = createPageLink(page.total - 1); - pageNumbers.appendChild(pageLink); - } - - if (data.length > page.rows) footer.appendChild(pageNumbers); - - var previous = document.createElement("a"); - previous.appendChild(document.createTextNode("Previous")); - previous.onclick = function() { - page.setPageNumber(page.number - 1); - renderBody(); - renderFooter(); - - triggerOnChange(); - }; - if (data.length > page.rows) footer.appendChild(previous); - - var infoLabel = document.createElement("div"); - infoLabel.setAttribute("class", "pagedtable-info"); - infoLabel.setAttribute("title", getLabelInfo()); - infoLabel.appendChild(document.createTextNode(getLabelInfo())); - footer.appendChild(infoLabel); - - var enabledClass = "pagedtable-index-nav"; - var disabledClass = "pagedtable-index-nav pagedtable-index-nav-disabled"; - previous.setAttribute("class", page.number <= 0 ? disabledClass : enabledClass); - next.setAttribute("class", (page.number + 1) * page.rows >= data.length ? disabledClass : enabledClass); - }; - - var measuresCell = null; - - var renderMeasures = function() { - var measuresTable = document.createElement("table"); - measuresTable.style.visibility = "hidden"; - measuresTable.style.position = "absolute"; - measuresTable.style.whiteSpace = "nowrap"; - measuresTable.style.height = "auto"; - measuresTable.style.width = "auto"; - - var measuresRow = document.createElement("tr"); - measuresTable.appendChild(measuresRow); - - measuresCell = document.createElement("td"); - var sampleString = "ABCDEFGHIJ0123456789"; - measuresCell.appendChild(document.createTextNode(sampleString)); - - measuresRow.appendChild(measuresCell); - - tableDiv.appendChild(measuresTable); - } - - me.init = function() { - tableDiv = document.createElement("div"); - pagedTable.appendChild(tableDiv); - var pagedTableClass = data.length > 0 ? - "pagedtable pagedtable-not-empty" : - "pagedtable pagedtable-empty"; - - if (columns.total == 0 || (columns.emptyNames() && data.length == 0)) { - pagedTableClass = pagedTableClass + " pagedtable-empty-columns"; - } - - tableDiv.setAttribute("class", pagedTableClass); - - renderMeasures(); - measurer.calculate(measuresCell); - columns.calculateWidths(measurer.measures); - - table = document.createElement("table"); - table.setAttribute("cellspacing", "0"); - table.setAttribute("class", "table table-condensed"); - tableDiv.appendChild(table); - - table.appendChild(document.createElement("thead")); - - var footerDiv = document.createElement("div"); - footerDiv.setAttribute("class", "pagedtable-footer"); - tableDiv.appendChild(footerDiv); - - // if the host has not yet provided horizontal space, render hidden - if (tableDiv.clientWidth <= 0) { - tableDiv.style.opacity = "0"; - } - - me.render(); - - // retry seizing columns later if the host has not provided space - function retryFit() { - if (tableDiv.clientWidth <= 0) { - setTimeout(retryFit, 100); - } else { - me.render(); - triggerOnChange(); - } - } - if (tableDiv.clientWidth <= 0) { - retryFit(); - } - }; - - var registerWidths = function() { - columns.subset = columns.subset.map(function(column) { - column.width = columns.widths[column.name].inner; - return column; - }); - }; - - var parsePadding = function(value) { - return parseInt(value) >= 0 ? parseInt(value) : 0; - }; - - me.fixedHeight = function() { - return options.rows.max != null; - } - - me.fitRows = function() { - if (me.fixedHeight()) - return; - - measurer.calculate(measuresCell); - - var rows = options.rows.min !== null ? options.rows.min : 0; - var headerHeight = header !== null && header.offsetHeight > 0 ? header.offsetHeight : 0; - var footerHeight = footer !== null && footer.offsetHeight > 0 ? footer.offsetHeight : 0; - - if (pagedTable.offsetHeight > 0) { - var availableHeight = pagedTable.offsetHeight - headerHeight - footerHeight; - rows = Math.floor((availableHeight) / measurer.measures.height); - } - - rows = options.rows.min !== null ? Math.max(options.rows.min, rows) : rows; - - page.setRows(rows); - } - - // The goal of this function is to add as many columns as possible - // starting from left-to-right, when the right most limit is reached - // it tries to add columns from the left as well. - // - // When startBackwards is true columns are added from right-to-left - me.fitColumns = function(startBackwards) { - measurer.calculate(measuresCell); - columns.calculateWidths(measurer.measures); - - if (tableDiv.clientWidth > 0) { - tableDiv.style.opacity = 1; - } - - var visibleColumns = tableDiv.clientWidth <= 0 ? Math.max(columns.min, 1) : 1; - var columnNumber = columns.number; - var paddingCount = 0; - - // track a list of added columns as we build the visible ones to allow us - // to remove columns when they don't fit anymore. - var columnHistory = []; - - var lastTableHeight = 0; - var backwards = startBackwards; - - var tableDivStyle = window.getComputedStyle(tableDiv, null); - var tableDivPadding = parsePadding(tableDivStyle.paddingLeft) + - parsePadding(tableDivStyle.paddingRight); - - var addPaddingCol = false; - var currentWidth = 0; - - while (true) { - columns.setVisibleColumns(columnNumber, visibleColumns, paddingCount); - currentWidth = columns.getWidth(); - - if (tableDiv.clientWidth - tableDivPadding < currentWidth) { - break; - } - - columnHistory.push({ - columnNumber: columnNumber, - visibleColumns: visibleColumns, - paddingCount: paddingCount - }); - - if (columnHistory.length > 100) { - console.error("More than 100 tries to fit columns, aborting"); - break; - } - - if (columns.max !== null && - columns.visible + columns.getPaddingCount() >= columns.max) { - break; - } - - // if we run out of right-columns - if (!backwards && columnNumber + columns.visible >= columns.total) { - // if we started adding right-columns, try adding left-columns - if (!startBackwards && columnNumber > 0) { - backwards = true; - } - else if (columns.min === null || visibleColumns + columns.getPaddingCount() >= columns.min) { - break; - } - else { - paddingCount = paddingCount + 1; - } - } - - // if we run out of left-columns - if (backwards && columnNumber == 0) { - // if we started adding left-columns, try adding right-columns - if (startBackwards && columnNumber + columns.visible < columns.total) { - backwards = false; - } - else if (columns.min === null || visibleColumns + columns.getPaddingCount() >= columns.min) { - break; - } - else { - paddingCount = paddingCount + 1; - } - } - - // when moving backwards try fitting left columns first - if (backwards && columnNumber > 0) { - columnNumber = columnNumber - 1; - } - - if (columnNumber + visibleColumns < columns.total) { - visibleColumns = visibleColumns + 1; - } - } - - var lastRenderableColumn = { - columnNumber: columnNumber, - visibleColumns: visibleColumns, - paddingCount: paddingCount - }; - - if (columnHistory.length > 0) { - lastRenderableColumn = columnHistory[columnHistory.length - 1]; - } - - columns.setVisibleColumns( - lastRenderableColumn.columnNumber, - lastRenderableColumn.visibleColumns, - lastRenderableColumn.paddingCount); - - if (pagedTable.offsetWidth > 0) { - page.setVisiblePages(Math.max(Math.ceil(1.0 * (pagedTable.offsetWidth - 250) / 40), 2)); - } - - registerWidths(); - }; - - me.fit = function(startBackwards) { - me.fitRows(); - me.fitColumns(startBackwards); - } - - me.render = function() { - me.fitColumns(false); - - // render header/footer to measure height accurately - renderHeader(); - renderFooter(); - - me.fitRows(); - renderBody(); - - // re-render footer to match new rows - renderFooter(); - } - - var resizeLastWidth = -1; - var resizeLastHeight = -1; - var resizeNewWidth = -1; - var resizeNewHeight = -1; - var resizePending = false; - - me.resize = function(newWidth, newHeight) { - - function resizeDelayed() { - resizePending = false; - - if ( - (resizeNewWidth !== resizeLastWidth) || - (!me.fixedHeight() && resizeNewHeight !== resizeLastHeight) - ) { - resizeLastWidth = resizeNewWidth; - resizeLastHeight = resizeNewHeight; - - setTimeout(resizeDelayed, 200); - resizePending = true; - } else { - me.render(); - triggerOnChange(); - - resizeLastWidth = -1; - resizeLastHeight = -1; - } - } - - resizeNewWidth = newWidth; - resizeNewHeight = newHeight; - - if (!resizePending) resizeDelayed(); - }; -}; - -var PagedTableDoc; -(function (PagedTableDoc) { - var allPagedTables = []; - - PagedTableDoc.initAll = function() { - allPagedTables = []; - - var pagedTables = [].slice.call(document.querySelectorAll('[data-pagedtable="false"],[data-pagedtable=""]')); - pagedTables.forEach(function(pagedTable, idx) { - pagedTable.setAttribute("data-pagedtable", "true"); - pagedTable.setAttribute("pagedtable-page", 0); - pagedTable.setAttribute("class", "pagedtable-wrapper"); - - var pagedTableInstance = new PagedTable(pagedTable); - pagedTableInstance.init(); - - allPagedTables.push(pagedTableInstance); - }); - }; - - PagedTableDoc.resizeAll = function() { - allPagedTables.forEach(function(pagedTable) { - pagedTable.render(); - }); - }; - - window.addEventListener("resize", PagedTableDoc.resizeAll); - - return PagedTableDoc; -})(PagedTableDoc || (PagedTableDoc = {})); - -window.onload = function() { - PagedTableDoc.initAll(); -};