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.

Filter by
Sorted by
Tagged with
0 votes
1 answer
88 views

Calculate The Declining Balance Method For Depreciation?

I have code generated by AI Aria in Opera browser The code gives wrong answer only for: Depreciation factor=1? ...
Mariusz Iwaniuk's user avatar
1 vote
1 answer
79 views

Historical data of financial funds

I would like to obtain the historical data of some funds, of which I know the ISIN code. Is there any way to do this with mathematica? For example, this fund here: https://markets.ft.com/data/funds/...
Giorgio Busoni's user avatar
1 vote
1 answer
97 views

How to improve performance of making an Exponentially Weighted Correlation Matrix?

I would like to make an Exponentially Weighted version of Correlation (similar to https://pandas.pydata.org/pandas-docs/version/0.17.0/generated/pandas.ewmcov.html)....
IntroductionToProbability's user avatar
0 votes
1 answer
80 views

Speed up compoundReturn across an array

I am trying to calculate a moving-window of compounded returns on a large 2D-array. (ie some kind of MovingMap on geometric returns) The Rows are time-steps and the Columns are different financial ...
IntroductionToProbability's user avatar
1 vote
0 answers
67 views

How to Name a Path in TemporalData?

Preamble: I am working with stock prices and need to perform calculations on them. And then extract the information for further calculations. TimeSeries/...
IntroductionToProbability's user avatar
1 vote
1 answer
139 views

Legacy Finance package

There used to be an old package Finance which contained useful functionality for converting between different interest rate representations, ...
user13892's user avatar
  • 9,313
0 votes
1 answer
91 views

How do I retrieve the SOFR (Secured Overnight Financing Rate) index/value in Mathematica?

SOFR doesn't show up in FinancialData[] (despite being a Bloomberg symbol). When I ask Wolfram|Alpha, it thinks I'm talking about "Overnight: The Movie". ...
Perry The Cynic's user avatar
3 votes
1 answer
50 views

Inconsistent Timing on FinancialBond valuations

I need to do bond valuations (lots of them across lots of data) using FinancialBond. Context & Background I have daily interest rate data on 30 year US Treasury ...
Jagra's user avatar
  • 14.3k
3 votes
0 answers
59 views

How to leave empty space on the right in tradingchart

The Tradingchart function is very useful, although tremendously graphics heavy. For better understanding of the image I would like to leave a white space on the right but it is ignored. For example. ...
Ramiro dell'Erba's user avatar
1 vote
0 answers
39 views

`CandlestickChart` how to display a separate x-axis tick for every single second?

I use CandlestickChart to display some price data. The data is only 30 seconds long and contains one candle per second. I'd like the chart to display a separate ...
Kagaratsch's user avatar
  • 11.9k
0 votes
0 answers
56 views

Can I use Timeseries of a Data to plot the ARCHProcess?

So, I have a list s={Timeseries1,Timeseries2,Timeseris3} I want to Plot a graph just like :Mathematica I tried to do this but I didn't understand some parts of the ...
amalsebastian7's user avatar
3 votes
0 answers
34 views

Is the way TimeValue[s, i, {t, t1}] works with s being a Cashflow using date expressions a bug or a feature?

The documentation for TimeValue tells us that in TimeValue[s,i,t] we can have s be a Cashflow...
gwr's user avatar
  • 13.4k
1 vote
0 answers
273 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 ...
Daniel Berkowitz's user avatar
1 vote
1 answer
75 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 ...
Rogo's user avatar
  • 830
4 votes
1 answer
87 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 ...
user1337's user avatar
  • 1,068
3 votes
1 answer
104 views

How To Compile The Computation Of Cumulative Returns

I'm trying to compile this function, specifically the second line which computes the cumulative return of 100 daily returns. ...
Daniel Berkowitz's user avatar
3 votes
1 answer
101 views

How to apply color function to my financial indicator?

My goal is to make a figure like this picture in a financial indicator, I want to plot “a colored” financial indicator below a trading chart. I prepared financial data and data of my indicator: ...
cheese.burger's user avatar
1 vote
0 answers
69 views

Irregular interval Internal Rate of Return [closed]

Does anyone know of a function that has been written that takes a list of cash flows and a list of associated dates and returns the internal rate of return? In other words a function similar to ...
crabtree's user avatar
3 votes
2 answers
172 views

Log of time series evaluated

I'm new to Mathematica and am trying to plot log-returns of a stock as a timeseries object. However, the following code gives me back elements of the form "Log[151.23$]" unevaluated. What am ...
Othman El Hammouchi's user avatar
1 vote
1 answer
93 views

Currency Interpretation for VND

Bug introduced in v12.2.0 or earlier, persisting through v13.2.1. Case number: 4973722 As I was helping an OP with a question involving Vietnamese currency, I didn't realize at the time that the ...
Syed's user avatar
  • 49.2k
0 votes
1 answer
82 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. ...
petr's user avatar
  • 1
2 votes
1 answer
94 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 ...
Michiel van Mens's user avatar
1 vote
2 answers
93 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 ...
Axha's user avatar
  • 53
0 votes
0 answers
89 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 ...
apt45's user avatar
  • 1,648
0 votes
2 answers
171 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 ...
kymset's user avatar
  • 1
0 votes
1 answer
104 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 ...
danboysk's user avatar
0 votes
1 answer
189 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 ...
Benoit's user avatar
  • 1
1 vote
0 answers
82 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 ...
zurg's user avatar
  • 117
6 votes
2 answers
321 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.
user5601's user avatar
  • 3,613
4 votes
1 answer
235 views

Doing calculations on values input in USD currency format (e.g., $1,234.56)

I'd like to be able to copy and paste, into MMA, numbers that have a standard USD currency format, i.e., that include dollar signs and comma separators, and get the output in the same format. I'd ...
theorist's user avatar
  • 3,623
3 votes
2 answers
301 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 ...
Jonathan Kinlay's user avatar
4 votes
1 answer
107 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. ...
VLC's user avatar
  • 241
0 votes
2 answers
93 views

(rolling) n-weekly average

I have the data of the SPX index weekly ...
Luigi's user avatar
  • 1,281
1 vote
2 answers
268 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 ...
dsmalenb's user avatar
  • 139
1 vote
1 answer
49 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: ...
Luigi's user avatar
  • 1,281
2 votes
2 answers
203 views

How to plot a new numerical FinancialIndicator in TradingChart

I plot a trading chart by using TradingChart for early December data: ...
cheese.burger's user avatar
0 votes
0 answers
177 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 ...
Giuseppe Vonella's user avatar
2 votes
1 answer
73 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 ...
Math Gaudium's user avatar
3 votes
1 answer
89 views

Manipulate InteractiveTradingChart or lazy Manipulate

Back in 2012, it seems that something like Manipulate[InteractiveTradingChart[ticker], {ticker, {"AMZN", "GOOGL"}}] worked fine. Mathematica 12....
Math Gaudium's user avatar
1 vote
1 answer
113 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 ...
user58270's user avatar
  • 135
2 votes
1 answer
424 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 ...
Kagaratsch's user avatar
  • 11.9k
12 votes
2 answers
580 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. ...
DLT's user avatar
  • 235
4 votes
1 answer
325 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 ...
Slartibartfast's user avatar
0 votes
1 answer
128 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 ...
zurg's user avatar
  • 117
3 votes
2 answers
548 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 ...
Shb's user avatar
  • 701
3 votes
0 answers
101 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 ...
Jonathan Kinlay's user avatar
4 votes
1 answer
101 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 ...
Faz's user avatar
  • 1,817
4 votes
0 answers
62 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: ...
user13892's user avatar
  • 9,313
1 vote
0 answers
62 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) ...
Nate's user avatar
  • 401
1 vote
1 answer
104 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: ...
Nate's user avatar
  • 401

1
2 3 4 5