# Questions tagged [finance]

Questions related to quantifying risk and the allocation of assets and liabilities over time under conditions varying uncertainty--including questions on the use of the built-in financial functions of Mathematica.

216 questions
Filter by
Sorted by
Tagged with
1 vote
45 views

### How To Fit Heston Model To Stock Data Stochastic Volatility Model

The stochastic volatility model known as the Heston model can be expressed in Mathematica in the following way https://reference.wolfram.com/language/example/HestonModel.html Define the Ito process of ...
1 vote
50 views

### Federal Reserve Interest Rate Data has years with differing number of weeks

I need to compute annual mean interest rates from public data. FRED mortgage rate data (available here: https://fred.stlouisfed.org/series/MORTGAGE30US) when downloaded as an Excel file, Imports as ...
• 591
1 vote
32 views

### FinancialData anomaly

As I learned from this quantitative finance question, 1981-04-17 was a trading holiday. This is in agreement with the 0 volume in that day ...
• 1,028
33 views

62 views

### About Internal mechanics in FinancialDerivative

I want to find the price of a call option,using mathematica. However, I found a question when using Financial Derivative. The following two codes are to get the price of the call. ...
• 1
74 views

### select the right numbers based on a condition

I want to optimize my stock portfolio based on three components: the price of the different stocks the number to buy of each of the stocks the expected return of each stock (after 12 months) For ...
• 2,371
1 vote
72 views

### Rearrange a matrix with new Table Headings-List

I have used a procedure to rearrange my data in a more appropriate way for data analysis such that more similar elements lie next to each other and dissimilar ones far apart. Let's say I have a 5x5 ...
• 53
69 views

### Customize FinancialIndicator

I have a set of financial data in a 5-minutes (download here) and 1-day timeframe (download here) Since the ordering of my dataset is different than the ordering taken by ...
• 1,578
83 views

### Antithetic Variates in Monte-Carlo simulations (code taking too long to execute)

I am trying to use the Antithetic Variates method to reduce error in stock price estimates. Essentially, I generate pairs of negatively correlated RV's and use them to simulate stock price. The ...
76 views

### List industry segment members using FinancialData [closed]

I'm trying to select get price, div yield and PE ratios for a given Sector (Industrial Segment) from the LSE. At the moment I'm trying to just get a list of the companies Unfortunately my script is ...
119 views

### Portfolio optimization

Mathematica provides codes for a portfolio optimization https://www.wolframcloud.com/objects/summerschool/pages/2017/AndresLopezMartinez_TE that do not work anymore. Any reason why? I have been trying ...
1 vote
63 views

### How can I use TradingChart without volume data?

I am trying to use the Mathematica Function TradingChart to produce a chart. I am using data produced by me for the plot and I do not have the volume data. Here is ...
• 107
204 views

### Is there a CryptocurrencyData alternative to FinancialData?

What's the easiest way to ingest time series data on cryptocurrencies into Mathematica? I'm looking for up-to-date price, volume, and other properties for both major coins and altcoins.
• 3,679
1 vote
131 views

### Calculating Average Price and P&L Efficiently Without Loops

A very common task is stock portfolio evaluation is to calculate the average price of stock holdings for a sequence of trades and from there to calculate the (realized) profit or loss. Obviously one ...
• 1,164
94 views

### How to show net income geographically of a company in a certain city

Let's say that I have a company, and I already extracted it's net profit with time series. ...
• 241
77 views

### (rolling) n-weekly average

I have the data of the SPX index weekly ...
• 1,055
144 views

### Exporting Stock Financial Data into Excel

I would like to pull 3 attributes (Open, Close, Volume) for a variety of stock symbols. I would like to pull the stock data within a specific range and export it to an excel spreadsheet. I would also ...
• 129
1 vote
42 views

### Index (SPX) weekly return with a condition

I am looking at statistics of the weekly returns of SPX. Taking all the weeks starting from 1st Jan 2010, the hisotgram of the returns is: ...
• 1,055
155 views

### How to plot a new numerical FinancialIndicator in TradingChart

I plot a trading chart by using TradingChart for early December data: ...
112 views

### Getting the source code of the custom indicator MESA

I would like to ask how to get the source code of a custom indicator offered by the InteractiveTradingChart function, in particular the MESA indicator (Maximum ...
65 views

### InteractiveTradingChart with date and time displayed for selected data

It is possible to modify TradingChart such that instead of just the date, date and time are displayed for a selected data point. Is there a "trick" that ...
• 389
79 views

### Manipulate InteractiveTradingChart or lazy Manipulate

Back in 2012, it seems that something like Manipulate[InteractiveTradingChart[ticker], {ticker, {"AMZN", "GOOGL"}}] worked fine. Mathematica 12....
• 389
1 vote
104 views

### The server returned the HTTP status code 406 + how to obtain stocks data

Any solution for this: Import["https://es.investing.com/indices/germany-30-futures-\ historical-data"] not successful. The server returned the HTTP ...
• 125
204 views

### Overlay a line plot onto a candlestick chart?

With the command CandlestickChart one can create charts such as CandlestickChart[data] Let's say, we take the 20-period moving ...
• 11.5k
470 views

### How can I plot my financial indicator below a trading chart (produced by TradingChart) with the same x-axis?

Since this question was not answered, I would like to ask again with some additional information. I have a trading chart saved as chart1 as follows. ...
• 215
191 views

### Looking up Stock Symbols in Mathematica

It has been a few years since i had used Mathematica, and I know that after yahoo feed was discontinued there have been some changes to how mathematica handles financial data. Back in the day we would ...
115 views

### Is financial visualization broken? Can you run any of these examples or InteractiveTradingChart[] at all?

I can't run anything relevant to financial visualization in my mathematica installation, i found these interesting example but anything that use the trading chart is kind of broken. EDIT: I'll add a ...
• 107
308 views

### two tier compound interest problem

I am trying to make sense of how mortgage repayment figures are calculated for two tier mortgages, where you fix your interest rate for a certain period and after that period, you fall back to the SVR ...
• 701
88 views

### Problems with CUDAFinancialDerivative in Mathematica 12.1

I am attempting to run some CUDA functions in MMA 12.1, specifically CUDAFinancialDerivative. As I recall, this function (and other CUDA functions) ran successfully on this machine with earlier ...
• 1,164
95 views

### Problem with StringPosition[] and slowness of Import[] in sentiment analysis

Using the post by J. Kinlay at Market Sentiment Analysis we can employ a simple yet effective Mathematica implementation for sentiment analysis in trading. Everything is very clear and useful in the ...
• 1,755
60 views

### Why am I getting incorrect result from EntityClass?

Suppose I want get 6 largest companies by market capitalization. I try the class using the old syntax: ...
• 8,217
1 vote
46 views

### ROI and Earnings Yield within FinancialData

Can I calculate within FinancialData properties these as follows: Earnings Yield = EBIT/Enterprise value ..where Enterprise value is the sum of market value of equity (including preferred equity) ...
• 401
1 vote
84 views

### Sort Stocks by MarketCap

If I correctly understand, here I have all the existing companies listed in every market and identified by each real name: ...
• 401
1 vote
63 views

### Conditions on FinancialData

I would like to order (3) on a Dataset or Table all the Financial Data between all markets respecting those constraints: each asset has to be shown as "Name" and "StandardName"; I would like to show "...
• 401
127 views

### Find market company names from FinancialData

Is there a way to get code names of publicly traded companies by any FinancialData option? I would like to identify for each market the company listed there and to associate it with the code name in ...
• 401
100 views

### FinancialData missing data for April 7 and April 8 2020 for many if not all US Stocks

FinancialData["IBM", {2020, 4, 3}]["Dates"] The above command yields: ...
• 81
140 views

### Using FinancialData to obtain historical data on NASDAQ closing prices

I have been struggling for over an hour, reading documentation, experimenting, google searching for information on how to ask for the closing price of the NASDAQ index. I don't want a stock on that ...
• 609
625 views

### Is FinancialData about to be deprecated?

A support case with the identification [CASE:4387967] was created. FinancialData seems to be losing information. For example in the documentation it says: ...
• 8,217
191 views

### Kolmogorov backward PDE with boundary conditions

I am trying to solve numerically Kolmogorov backward PDE with boundary conditions: ...
• 1,548
71 views

### Accessing the Australian Stock Exchnage through FinancialData

This answer from 2015 suggests that data from the Australian Stock Exchange can be accessed using FinancialData["AX:CBA"]. However, when I run this I get ...
85 views

### What financial forecasting methods are available for evaluating the profitability of a cash flow?

I'm sorry for this question. I'm looking for forecasting methods for evaluating the profitability of a cash flow I'm not experienced with this branch of the economics, I've done some searches in the ...
• 518
97 views

### Stocks & Finances

Are there any guides, examples, tutorials how to use finance related functions in Mathematica (except documentation)? Are there any packages for plotting Japan candles graphs in Mathematica?
1 vote
148 views

### Interest Only using TimeValue and Annuity

I'm wondering if there is a way to calculate the interest only payment on a mortgage using the TimeValue[] and Annuity[] ...
• 123
110 views

### How complete is the financial statement data?

Has anyone here looked at CompanyData or Entity["Company",All]? Are both of them the same data but just a different interface ...
• 8,217
178 views

### Very slow rendering of Quantity

I noticed since Mathematica v12 a very slow frontend when rendering the Units. Easy to show: Quantity[Range[1, 100], "Euros"] Takes (timed with a stopwatch) ...
• 3,600