Translate

16 julho 2019

Rir é o melhor remédio

A vida é difícil. Mas tente sempre achar um meio, não uma desculpa.

Concentração e Mudança Tecnológica

Hsieh e Rossi-Hansberg estudaram o setor de serviço nos Estados Unidos entre 1977 a 2013. Eles verificaram se a nova revolução industrial em setores de serviço provocou algum aumento na concentração nas empresas.

O interessante na abordagem dos autores é que usam a estrutura de custo - em particular a participação dos novos custos fixos tecnológicos - para procurar entender a concentração no setor. A conclusão dos autores é que a concentração não apresentou mudança substancial - nem aumento, nem redução - durante o período analisado.

Mas será que isto é válido para a contabilidade? Sendo uma atividade de serviço, também não deveria existir um aumento na concentração. É importante notar que a questão da concentração é bastante complexa. Bonfigliogi, Crinò e Gancia mostraram que as transações de empresas multinacionais podem afetar este valor. Rossi-Hansberg e outros indicaram que a concentração nacional parece aumentar, enquanto a concentração local indica uma redução.

E a contabilidade? A questão da concentração é uma preocupação bastante presente entre as empresas de auditoria. Este assunto é bastante pesquisado na literatura, como em Dantas, Medeiros e Paulo, em 2011. Entretanto, no escritório de contabilidade não sabemos ao certo se a concentração está aumentando ou não. No caso da contabilidade, muitas vezes é uma atividade "terceirizada" e isto pode afetar a concentração. Dois outros fatores podem afetar esta concentração: a mudança tecnológica (vide Hsieh e Hansberg) afetando a estrutura de custo e a mudança de legislação, como a criação do MEI.

Recentemente, Souza, Silva, Silva e Souza (é isto mesmo) analisaram a concentração dos profissionais de contabilidade em termos geográficos. Sabemos que cidades com mais habitantes possuem mais profissionais, mas os autores mostraram que quando se analisa em termos proporcionais, a concentração é afetada por um fator: o desenvolvimento humano do local.

The Industrial Revolution in Services - Chang-Tai Hsieh, Esteban Rossi-Hansberg - NBER Working Paper No. 25968 - Issued in June 2019
Bonfiglioli, A, R Crinò and G Gancia (2019), "Concentration in international markets: Evidence from US imports," CEPR Discussion paper 13566.
Diverging Trends in National and Concentration - Esteban Rossi-Hansberg, Pierre-Daniel Sarte, Nicholas Trachter. NBER Working Paper No. 25066. Issued in September 2018
DANTAS, José Alves; DE MEDEIROS, Otávio Ribeiro; PAULO, Edilson. Relação entre concentração e rentabilidade no setor bancário brasileiro. Revista Contabilidade Finanças, v. 22, n. 55, p. 5-28, 2011.

15 julho 2019

Turing na nota de 50 libras

Alan Turing irá aparecer na nova nota de 50 libras do Bank of England. Turing foi responsável pela quebra do código dos nazistas durante a segunda guerra mundial. A nota deve entrar em circulação em 2021.

Turing foi um matemático e considerado o pai da computação e da inteligência artificial. Durante a guerra, Turing ajudou a quebrar o código do Enigma, a máquina de código dos alemães. Mas em 1952 foi condenado por indecência, por ter um caso com um homem, sendo castrado quimicamente. Somente em 2013 recebeu o perdão real.

Quando pensou em lançar uma homenagem a um cientista, o Banco da Inglaterra recebeu 227 mil indicações. Entre os finalistas: Mary Anning, Paul Dirac, Rosalind Franklin, William Herschel e Caroline Herschel, Dorothy Hodgkin, Ada Lovelace e Charles Babbage, Stephen Hawking, James Clerk Maxwell, Srinivasa Ramanujan, Ernest Rutherford, Frederick Sanger e Alan Turing.

14 julho 2019

Falência do Lehman Brothers: o papel da E&Y

Resumo:

For many years prior to its demise, Lehman Brothers employed Ernst & Young (EY) as the firm’s independent auditors to review its financial statements and express an opinion as to whether they fairly represented the company’s financial position. EY was supposed to try to detect fraud, determine whether a matter should be publicly disclosed, and communicate certain issues to Lehman’s Board audit committee. After Lehman filed for bankruptcy, it was discovered that the firm had employed questionable accounting with regard to an unorthodox financing transaction, Repo 105, which it used to make its results appear better than they were. EY was aware of Lehman’s use of Repo 105, and its failure to disclose its use. EY also knew that Lehman included in its liquidity pool assets that were impaired. When questioned, EY insisted that it had done nothing wrong. However, Anton R. Valukas, the Lehman bankruptcy examiner, concluded that EY had not fulfilled its duties and that probable claims existed against EY for malpractice. In this case, participants will consider the role and effectiveness of independent auditors in ensuring complete and accurate financial statements and related public disclosure.

Fonte:

Wiggins, Rosalind Z.; Bennett, Rosalind L.; and Metrick, Andrew (2019) "The Lehman Brothers Bankruptcy D: The Role of Ernst & Young," Journal of Financial Crises: Vol. 1 : Iss. 1, 100-123.

Resultado de imagem para Ernst & Young (EY) lehman

13 julho 2019

Teoria e Efeito causal

Em fevereiro, Stefan Szymanski publicou um texto no site Soccernomics chamado "Soccer Analytics: Science or Alchemy?". Ele trata de muitos temas: previsão no futebol, aumento no número de dados, modelos com muitas variáveis, teoria a partir dos dados, etc. Vários dos aspectos foram tratados no blog nos últimos anos.

No final ele apresenta quatro pontos:

(1) Theories are useful because they help us to identify causal effects. Big data approaches in soccer seem largely to avoid theorizing, which risks reducing the analysis simply to the search for correlations. I don’t think any science can prosper if straightjacketed in this way.

(2) In natural science causal effects are usually tested using controlled experiments. Social science relies on observational data, which makes the identification of causality much more difficult. There have been huge advances in our understanding of how to identify causality through statistical methods over the last three decades, but as yet I’ve seen little recognition of the issue in soccer analytics papers.

(3)There is a financial profit to be made in soccer analytics. Mostly this is not about beating the bookies but advising clubs on identification of strategies, playing talent and so on. This world closely resembles the world of alchemy- it is secretive and given to obscure utterings. Results are announced but not explained, success is claimed but not proven. This is perhaps inevitable as long as the potential for profit exists. There are also such non-scientific analyses of the stock market, together with promises of untold returns. The only cure for this a healthy skepticism.

(4) In the end, I believe, soccer analytics will be judged on its capacity to predict. I have outlined some of the challenges to developing predictions in relation to game results, but there are potentially other areas where soccer analytics can contribute, involving outcome related to specific on-field events.

Rir é o melhor remédio

Honestidade como fraqueza

Índice de Sharpe esconde riscos

O gráfico abaixo mostra no eixo X o índice de Sharpe para 3098 fundos de hedge de Janeiro de 2004 a 2007 e no eixo Y suas perdas medidas pelo desvio-padrão após a crise de 2008. Os fundos menos voláteis tiveram as maiores perdas. Quanto mais estável o retorno, maior a chance de perdas. Ou seja,o índice sharpe não consegue prever desempenho futuro e não prevê perdas durante crises. Ele não funciona out-of-sample (fora da amostra)



Fonte: aqui

12 julho 2019

Leasing, IFRS 16 e Portugal

Um artigo de um jornal português sobre a norma de Leasing.

A IFRS 16 – Locações entrou em vigor a 1 de janeiro de 2019 e teve os seus reflexos na publicação das contas das empresas no primeiro trimestre do ano. Segundo alguns analistas o objetivo da norma não foi totalmente atingido. Qual a razão para que tal tenha acontecido?

A IFRS 16 requere que os locatários contabilizem todas as locações (“operacionais” e “financeiras) com base num modelo único de reconhecimento no balanço. Assim, na data de início da locação, o locatário reconhece a responsabilidade relacionada com os pagamentos da locação e o ativo que representa o direito a usar o bem subjacente (ROU), durante o período da locação.

Simultaneamente, é reconhecido o custo do juro sobre o passivo da locação e a respetiva amortização do ROU. O objetivo pretendido com a norma seria permitir a comparabilidade: i) das demonstrações financeiras através do registo em balanço de todos os ativos e passivos das locações, independentemente da forma de detenção dos ativos e do seu financiamento; e ii) dos indicadores de performance das empresas (KPI’s).

Da análise das contas do primeiro trimestre das principais operadoras de telecomunicações europeias, pode concluir-se que os maiores impactos da aplicação da referida norma, resultam do registo em balanço dos contratos de arrendamento de infraestruturas (sites) de rede móvel e rede fixa, lojas, edifícios, data centres e da apresentação em resultados da amortização do ROU e dos juros do passivo da locação. Simultaneamente, verifica-se que alguns KPI’s anteriormente usados para a avaliação da performance das empresas e acompanhados pelos stakeholders, foram agora significativamente alterados, dificultando a comparabilidade das empresas do setor, no que se refere à análise do grau de alavancagem e da avaliação das empresas. Como consequência e exemplo, algumas empresas passaram a apresentar o EBITDA AL (EBITDA After Leases), um novo KPI que difere significativamente do atual EBITDA, agora sem os gastos de arrendamentos e juros, ou seja, de montante significativamente superior ao EBITDA AL. Será o início do regresso ao passado e dar-se-á a substituição deste KPI pelo Cash Flow?

Apesar das Normas Internacionais de Contabilidade pretenderem a harmonização das informações financeiras apresentadas pelos emissores de valores mobiliários na União Europeia e garantir uma maior transparência e comparabilidade, é necessário a definição de um modelo “único” de divulgação das contas ao mercado e dos KPI’s apresentados, de modo a que uma nova norma, como a IFRS16, não prejudique a comparabilidade das empresas do setor.


Jornal Econômico (Portugal) - Jessica Pereira

Rir é o melhor remédio

Matemática e entrevista de emprego

11 julho 2019

Econometria é uma fraude

Grande boa parte dos modelos econométricos são inúteis. Vou elencar os motivos abaixo:

1) Em variáveis ​​econômicas uma única observação em 10.000, ou seja, um único dia em 40 anos, pode explicar a maior parte da "curtose", a medida padrão de momento finito de caudas pesadas.

2) Para o mercado de ações dos EUA, um único dia, o crash de 1987, determinou 80% da curtose para o período entre 1952 e 2008. O mesmo problema ocorre com juros, taxa câmbio, commodities e outras variáveis econômicas e financeiras.

3) O problema não é apenas que os dados tenham caudas pesadas, algo que as pessoas sabem,
mas que não é possível determinar "caudas pesadas" usando métodos padrões. Isso implica que as ferramentas usadas pelos economistas baseadas na norma L2, ou seja variáveis elevadas ao quadrado, como desvio-padrão, variância, correlação, regressão não têm validade científica. A variância dos quadrados é análogo ao quarto momento. Além disso, p-valor não tem validade com variáveis econômicas e financeiras.

4) Os resultados da maioria dos trabalhos em economia são baseados nesses métodos estatísticos padrões .Portanto, não é esperado que esses estudos sejam replicados, e eles efetivamente não o fazem. Além disso, essas ferramentas incentivam a tomada de riscos não desejados.

5) Aí você pode se perguntar porque muita gente (acadêmicos e economistas) continua a usar métodos econométricos? Econometria captura coisas comuns e mascara efeitos de ordem superior, que são mais importantes.  Como falências não são tão freqüentes,  eventos extremos não aparecem em dados, então o pesquisador acadêmico parece inteligente na maioria das vezes, enquanto estão na verdade fundamentalmente errados. 

6) A lei dos grandes números funciona bem devagar no mundo real, isso quando funciona.

7) A média da distribuição raramente corresponderá à média amostral, particularmente se
a distribuição tem assimetria;

8) Desvio-padrão e variância não podem ser usados em economia e finanças.

9) Beta, razão de Sharpe e outras métricas não são informativas.

10) Regressão Linear não funciona. O Teorema de Gauss-Markov falha, pois só é possível usá-lo quando a amostra é infinita. No mundo real, a amostra é finita. Ou seja, o mundo real é pré-assintótico.

Fonte: Nassim Nicholas Taleb. Errors, robustness, and the fourth quadrant. International
Journal of Forecasting, 25(4):744–759, 2009.



Data Science: a nova astrologia


[...]

I’ve spent most of the last six years playing around with data and drawing insights from it (a lot of those insights have been published in Mint). A lot of work that I’ve done can fall under the (rather large) umbrella of “data science", and some of it can be classified as “machine learning". Over the last couple of years, though, I’ve been rather disappointed by what goes on in the name of data science.

Stripped to its bare essentials, machine learning is an exercise in pattern recognition. Given a set of inputs and outputs, the system tunes a set of parameters in a mathematical formula such that the outputs can be predicted with as much accuracy as possible given the inputs (I’m massively oversimplifying here, but this captures sufficient essence for this discussion).

One big advantage with machine learning is that algorithms can sometimes recognize patterns that are not easily visible to the human eye. The most spectacular application of this has been in the field of medical imaging, where time and again algorithms have been shown to outperform human experts while analysing images.

In February last year, a team of researchers from Stanford University showed that a deep learning algorithm they had built performed on par against a team of expert doctors in detecting skin cancer. In July, another team from Stanford built an algorithm to detect heart arrhythmia by analysing electrocardiograms, and showed that it outperformed the average cardiologist. More recently, algorithms to detect pneumonia and breast cancer have been shown to perform better than expert doctors.

The way all these algorithms perform is similar—fed with large sets of images that contain both positive and negative cases of the condition to be detected, they calibrate parameters of a mathematical formula so that patterns that lead to positive and negative cases can be distinguished. Then, when fed with new images, they apply these formulae with the calibrated parameters in order to classify those images.

While applications such as medical imaging might make us believe that machine learning might take over the world, we should keep in mind that left to themselves, machines can go wrong spectacularly. In 2015, for example, Google got into trouble when it tagged photos containing a black woman as “gorillas".

Google admitted the mistake, and that the classification was “unacceptable" but it appears that its engineers couldn’t do much to prevent such classification. Last month, The Guardian reported that Google had gotten around this problem by removing tags such as “gorilla", “chimpanzee" and “monkey" from its database.

The advantage of machine learning—that it can pick up patterns that are not apparent to humans—can be its undoing as well. The gorilla problem aside, the problem with identifying patterns that are not apparent or intuitive to humans is that meaningless patterns can get picked up and amplified as well. In the statistics world, this is known as “spurious correlations".

And as we deal with larger and larger data sets, the possibility of such spurious correlations appearing out of sheer randomness increases. Nassim Nicholas Taleb, author of Fooled by Randomness and The Black Swan had written in 2013 about how “big data" would lead to “big errors".

We are seeing this with modern machine learning algorithms that rely on lots of data as well. For example, a team of researchers from New York University showed that algorithms detecting road signs can be fooled by simply inserting an additional set of training images with an obscure pattern in the corner. More importantly, they showed that a malicious adversary could choose these additional images carefully in a way that the misclassification wouldn’t be apparent when the model was being trained.

Traditionally, the most common method to get around spurious correlations has been for the statistician (or data scientist) to inspect their models and to make sure that they make “intuitive sense". In other words, the models are allowed to find patterns and then a domain expert validates those patterns. In case the patterns don’t make sense, data scientists have tweaked their models in a way that they give more meaningful results.

The other way statisticians have approached the problem is to pick models that are most appropriate for the data at hand. Different mathematical models are adept at detecting patterns in different kinds of data, and picking the right algorithm for the data ensures that spurious pattern detection is minimized.

The problem with modern machine learning algorithms, however, is that the models are hard to inspect and make sense of. It isn’t possible to look at the calibrated parameters of a deep learning system, for example, to see whether the patterns it detects make sense. In fact, “explainability" of artificial intelligence algorithms has become a major topic of interest among researchers.

Given the difficulty of explaining the models, the average data scientist proceeds to use the algorithms as black boxes. Moreover, determining the right model for a given data set is more of an art than science, and involves the process of visually inspecting the data and understanding the maths behind the models.

With standardized packages being available to do the maths, and in a “cheap" manner (a Python package called Scikit Learnallows data scientists to implement just about any machine learning model using three very similar looking lines of code), data scientists have gotten around this “problem".

The way a large number of data scientists approach a problem is to take a data set and then apply all possible machine learning methods on it. They then accept the model that gives the best results on the data set at hand. No attempt is made to understand why the given inputs lead to the output, or if the patterns make “physical sense". As this XKCD strip puts it, this is akin to stirring a pile of answers till they start looking right.

And this is not very different from the way astrology works. There, we have a a bunch of predictor variables (position of different “planets" in various parts of the “sky") and observed variables (whether some disaster happened or not, in most cases). And then some of our ancients did some data analysis on this, trying to identify combinations of predictors that predicted the output (unfortunately, they didn’t have the power of statistics or computers, so in that sense the models were limited). And then they simply accepted the outputs, without challenging why it makes sense that the position of Jupiter at the time of wedding affects how someone’s marriage would go.

Armed with this analysis, I brought up the topic of astrology and data science again recently, telling my wife that “after careful analysis I admit that astrology is the oldest form of data science".

“That’s not what I said," Priyanka countered. “I said that data science is new-age astrology, and not the other way round."

Fonte: aqui

Machine Learning