« first day (3869 days earlier)      last day (36 days later) » 

12:57 PM
@terdon, you can't escape single quotes within plain '...', but you can within a $'...'. Of course the syntax highlighting doesn't know it here. — ilkkachu 4 mins ago
@ilkkachu can you give an example?
never mind
$ echo $'\tas\'d'
	as'd
Thanks, TIL.
 
1:21 PM
```
mc@mc:~/practice/data$ awk -F'[< ]' '/<td class="headerCovTableEntryLo">/{print $3; exit}' input2
class="headerCovTableEntryLo">39.2
mc@mc:~/practice/data$ awk -F'[> ]' '/<td class="headerCovTableEntryLo">/{print $3; exit}' input2
39.2
```
@terdon This is I get from these commmads.
 
@PrabhjotSingh Ah, good, I was about to ask you to come into chat
@PrabhjotSingh AAAAAAaaaaaaaaaaaaaa! I see what you mean. Yes, I had a typo there (I had originally used -F'[<> ]' and then manually edited it and removed the > instead of removing the <).
I'm sorry, I was confused because you had suggested using just -F'>' which would not work, I hadn't realized you were telling me to use -F'[> ]' (so the '<' and a space)
Thanks!
 
@terdon I would be thankful to you if you tell me what '( )' exactly does. as in this answer.
 
@PrabhjotSingh I cannot, I'm afraid. The first time I saw that was in that exact answer, so I don't know anything more than you do. I was also quite intrigued, and I confirmed it works (and so does -F'[ ]') but I don't know exactly how or why.
We should ask @αғsнιη
 
@terdon Thanks I will ask. And thanks to you for help and responding.
 
Hey, I should be thanking you! You're the one who pointed out my error :) So thanks!
 
 
1 hour later…
2:36 PM
@PrabhjotSingh that sets the awk field separator to single space character.
which default is one-or-more of Space/Tabs
-F'[ ]' == -F'( )' == -F' | ' or anything else that can end up field separator to a single space
when setting like that (regex mode), anything between two spaces act as a separate field by itself
see this example
echo 'a b  c  d    e' |awk -F'[ ]' '{ while(++i<=NF) print "[" $i "]"; gsub(FS, "[]") }1'
[a]
[b]
[]
[c]
[]
[d]
[]
[]
[]
[e]
a[]b[][]c[][]d[][][][]e
better
echo 'a b  c  d    e' |awk -F'[ ]' '{ while(++i<=NF) printf "[" $i "]" }'
[a][b][][c][][d][][][][e]
so by this way consecutive spaces preserve intact when awk wants to rebuild the $0 as when we update the content of a field as I did in my that answer
 
@αғsнιη But the cool thing is that doing it that way preserves the original separators, right? That's what I don't quite understand. I can see it works:
$ printf 'f1 f2   f3       f4\n' | awk '{$1="";print}'
 f2 f3 f4
$ printf 'f1 f2   f3       f4\n' | awk -F'( )' '{$1="";print}'
 f2   f3       f4
 
yes
 
That's the part I don't get. Why would that preserve them?
Ah! You are saying that consecutive FS characters are not joined together!
 
empty string between FS is also counts as a field
 
gotcha
$ printf 'f1 f2   f3       f4\n' | awk -F'( )' '{$1="";print NF}'
12
$ printf 'f1 f2   f3       f4\n' | awk '{$1="";print NF}'
4
 
2:50 PM
so an FS must be add back around empty string when rebuilding $0
and that finally lets line keep all intact
I mean rebuild based on the OFS, so there we have some empty string fields, so awk adds OFS for them too
BTW that is not the only answer I used that way :D
1
A: awk: Preserve formatting of output when substituting field

αғsнιηanother trick is to force awk's field separator to use "single space" as field separator by defining it as rexed like -F'( )', and perform the modification on Use% column counting down from the end of the line to $(NF-1), since last two columns always separated with single space, so it's easy to...

and some others, that I couldn't find now : )
 
3:12 PM
Thanks @αғsнιη for explaining about beauty output.
 
3:27 PM
@PrabhjotSingh you are welcome!
 
 
1 hour later…
4:32 PM
I just happened across this article. I didn't realise things were this bad in the UK. Though I suppose I shouldn't be surprised.
I guess I have an inherent advantage in India. Whenever I talk to anyone I assume he or she is lying to me/trying to cheat me. As a working hypothesis, which may be subject to modification, but is frequently and distressingly accurate.
 
4:50 PM
anyone buying amd/intel this week?
 
@jesse_b Buying a processor?
 
@FaheemMitha securities
 
@jesse_b Ah, yes. That was actually the more obvious interpretation, but because of the topic matter of this room, I went a different direction. Why?
 
@FaheemMitha They are currently dropping like rocks because of all the news about semiconductor shortages which is the exact opposite of a reasonable reaction. AMD especially. I think it's an extremely rare opportunity for a pretty safe investment with a high likelyhood of good returns.
 
@jesse_b I see. Interesting.
Just looked at Intel. Doesn't seem like a particularly big drop to me.
Of course, I'm used to India, which behaves differently.
Also, we have significant inflation.
 
5:04 PM
yeah intel was overvalued before the drop anyway so while it did drop significantly it's still a little higher than I would want to pay for it but amd was undervalued before the drop and just continues to drop
Plus I am much more confident in amd in any case. I think intel is not going anywhere as the market leader for quite some time but I also think AMD is going to make a lot of movement closing that gap over the next 10 years which would mean a possible 10x or more return on investment
 
Yes, AMD has dropped a bit more.
@jesse_b Do you deal with equities regularly? Supposedly the US market is so efficient it's hard to do well. Or so I've heard. I've been studying the Indian market a little bit recently. I think it probably has more opportunities, but it's all still rather bewildering.
The main issue here is the difficulty of getting good, and reasonably priced data. No idea about the US.
 
@FaheemMitha I do and that is correct but in the long term successful companies are going to be worth more than they are today. In the short term the market is a voting machine and in the long term it is a weighing machine. If you can do some basic reasoning to calculate the approximate value of the company and don't ridiculously overpay for it you should do fine in a 10+ year timeframe
If you are planning to make quick returns it's probably not the right vehicle for that
It is a very complicated thing though, I strongly recommend a book called "The Intelligent Investor" by ben graham if you are going to get into it.
@FaheemMitha The data here is better than it has ever been. All of the major brokerage platforms provide pretty good information but yahoo finance is the best I've seen and it also has a pretty robust API. And basically any publicly traded company posts all their annual reports on their website. You can get the latest 10k's directly from the sec website
 
5:20 PM
@jesse_b Wouldn't ARM be an even safer bet then? (he asked, demonstrating his profound ignorance)
 
@terdon nvidia is definitely a powerhouse and it has also taken a hit with all the recent news but it too has been pretty overpriced, they received the bulk of the hype from crypto mining
 
NVIDIA?
 
they make arm processors
 
Oh. Well, I did mention my ignorance. I hadn't realized ARM Ltd was owned by NVIDIA.
 
there may be other companies doing it too, not really that up to speed on them. I have worked with some recently though and am pretty confident they aren't going to be shocking the market any time soon
 
5:23 PM
> On 13 September 2020, it was announced that Nvidia would buy Arm from SoftBank for $40 billion, subject to usual scrutiny, with the latter acquiring a 10% share in Nvidia.[8][17]
 
6:03 PM
@jesse_b Yes, I have a copy of that. I didn't find it particularly useful, though.
Of course, there are lots of books about investing. I've looked at a few others.
My conclusion is that investing is a decision rule with a lot of inputs.
Which makes it difficult for any human who isn't a calculator. Especially if there is a lack of accessible and accurate data.
@jesse_b I was thinking of downloading all relevant data locally so on can look at it, run stuff on it and so forth.
In India it seems difficult to find a place to obtain such data. At least at reasonable prices.
I've been doing some reason, mostly in the Indian context, on equities and investing in general. My general conclusion was that it's a really good way to lose money if you don't know what you're doing.
And I suspect most people don't know what they are doing.
@jesse_b Complicated. Yes, agreed.
 
@FaheemMitha as far as I can tell most respected books on it cover attitude more than "tips and tricks" as there are no tips or tricks and there are no magic formulas to make you successful. The data is good to look at but ultimately if you rely on doing any real math you shouldn't be. The numbers should be so apparent that you can just look at them and know. It's mostly attitude though. You have to be able to hold when things are dropping and not give into the hype of things rising
 
@jesse_b It's not about math, per se. More like running statistics on it. Which is sort of necessary if you are trying to cover a wide range of equities at the same time.
I don't know what the "professionals" do, but I bet they must be doing things like that. I'm not suggesting good data is a magic bullet. But it's necessary.
 
6:18 PM
@FaheemMitha The professionals do and they get beat by monkeys with darts every time
 
@jesse_b There are no tips or tricks, but there are certainly things to analyse. Like a checklist.
@jesse_b I don't know how one could find that out.
 
Also, it sounds unlikely.
 
Tons of studies have been done on it and untrained people picking companies with no knowledge of the data beat the experts in overwhelmingly high odds
 
@jesse_b That sounds unlikely. They should make their code and data public.
 
6:20 PM
And the S&P 500 index fund always beats the experts
 
@FaheemMitha there are a few caveats in the article
 
@jesse_b That's also hard to believe.
 
@FaheemMitha that data is easily available
 
I suspect part of it is that if you are on an index, you will just ignore what's going on, and not do crazy things.
@jesse_b Right, the stock data. And then they ran simulations on it?
I'd like details.
 
Warren Buffett has a standing bet about it in fact, a person took him up on it once and lost. His bet is something like any 5 hedge funds over any 7 year period or something
 
6:22 PM
@FaheemMitha You have been given a link. Why not click on it?
 
The hedge funds would be averaged together which increases the odds in the index funds favor but in that particular case not a single one of them outperformed the S&P 500 index
 
There was a link?
 
Oh, the Forbes link. Yes, I saw the article.
@jesse_b Hedge funds. Ah, yes. That's about trying to time the market, isn't it?
@jesse_b Yes, I think I read about that a while back.
 
@FaheemMitha It shouldn't be, timing the market is one of the first things you learn that you shouldn't do
 
6:24 PM
I notice he didn't extend that bet to the PMS people.
 
Hedge funds are mostly just mutual funds with less restrictions
 
@jesse_b Hedge funds are about shorting and stuff. Maybe also going long. But I had the impression it was more about shorting.
 
@FaheemMitha they are about making money in securities but one of the biggest differences between hedge funds and mutual funds is that mutual funds are not allowed to short stocks
 
@jesse_b OK. Well, mutual funds just buy and sell securities, don't they?
 
the point of buffetts bet though is that over a long enough period of time almost nobody actually beats the market. The S&P 500 index follows "the market" almost exactly. So while a hedge fund may make incredible returns some years, they also underperform the market others. If you average out all their returns over a long enough time it almost never is better than the market
one of the only big exceptions to this is peter lynch who ran the magellan fund for fidelity and averaged a 29% return over his career which is significantly better than the market.
 
6:28 PM
@jesse_b One thing I don't understand. What is "the market"? And how does the S&P follow something that has not been defined?
 
he also strongly recommends the intelligent investor and agrees with buffett
 
I recall Buffett recommends index funds. In other words, do as I say, not as I do.
I assume Buffett himself hasn't put his money in index funds.
 
the standard and poor's 500 index is an index that tracks the 500 largest companies in US stock exchanges. In doing so it almost directly emulates what "the market" is doing as a whole
@FaheemMitha He has a significant amount of money into VOO but when you are working with figures as large as he is that isn't a viable option for all of his capital. He also freely admits that he will not beat the market
 
@jesse_b Again, what is this "market", and what is it doing as a whole? And how do you know that the S&: is tracking it almost exactly?
 
> A market is a composition of systems, institutions, procedures, social relations or infrastructures whereby parties engage in exchange.
 
6:32 PM
@jesse_b I didn't get the impression that he actually puts money in the index. But of course I don't know.
 
it's certainly not any significant percentage of their holdings
 
This line, presumably.
Vanguard 500 Index Fund ETF	VOO	43,000	$377.51	$16,232,930	0.0%
 
and SPY
 
SPDR S&P 500 ETF Trust SPY 39,400 $410.73 $16,182,762 0.0%
?
 
He was asked about it in a recent shareholders meeting because berkshire is currently sitting on a tremendous amount of capital, presumably because they are awaiting the inevitable market crash so they can deploy that capital on discount securities. He was asked why they don't put a lot of that money into index funds where it would earn more returns that treasury funds
Yes
 
6:38 PM
@jesse_b Well, if the market was to crash, presumably the index funds would also go down. Why is it "the inevitable market crash"?
 
@FaheemMitha market crashes in general are inevitable, but we are currently in dangerously overpriced territories
Bubbles feed themselves though by the nature of what creates a bubble unfortunately so nobody can predict when it will pop, it could keep going for the next 5 years
 
@jesse_b I see. But I think that's quite common. Overpricedness, I mean. Here in India, much of the market is also quite expensive. As in, I'm not touching this with a bargepole expensive.
I don't understand why anyone would buy stocks in the 60-100 P/E range. Or higher.
 
yes. Like tesla selling with a market cap equal to over 60% of the entire auto industry while accounting for less than 1% of global auto sales
 
There is just so much empty air beneath.
@jesse_b Yes, that's an interesting one. Maybe Musk has magical powers, and has people hypnotized.
Personally I start getting nosebleeds if I see anything over 20 P/E, and with more than negligible debt.
@jesse_b I should mention, as a disclaimer, that having a statistics degree means, if you see data, you want to analyze it. Maybe you're right, and it's pointless.
Wonderful. The timing package I'm supposed to use is giving me compile errors.
TeX never makes it easy, does it?
 
@FaheemMitha I have about 25 spreadsheets that I use to plug data into to calculate free cash flow, forward P/E, discounted cash flow, etc :)
 
6:45 PM
@jesse_b Can you download data into those spreadsheets directly? Also, why not use a real DB?
 
ultimately I make my decision on the company and not the numbers, I just want the numbers to look approximately right
@FaheemMitha No I started working on the yahoo finance api to do it but I gave up because it's not hard to just copy and paste them in
 
@jesse_b I see. So you go by feel?
@jesse_b Automated would be better, assuming it's possible.
I don't really use spreadsheets. I would use a DB for this kind of thing, probably.
 
@FaheemMitha I guess you could say that. Peter Lynch says the best companies to invest in are ones you know, preferably from your own career field
 
For low-pressure stuff and small amounts of data, SQLite works OK.
@jesse_b Sure. The main thing is to understand the company well. That's the hardest part, of course.
 
I am comfortable investing in microsoft because I know they are making huge moves in cloud and their OS will be desirable for at least 10 if not 20 years to come. I use the numbers to get a general sense of what price I am comfortable buying them for but not to tell me whether or not they will still be around in 20 years
 
6:49 PM
@jesse_b I've been reading forum.valuepickr.com over the past year. It's been very informative, but also quite bewildering, with such a huge mass of information.
This is just for the Indian markets.
@jesse_b I understand.
But in any case, it's been very useful. I'm not aware of anything like it for markets in other countries. Frankly, I'm surprised it exists at all.
Very useful resource, IMO.
 
yeah there are a lot of sites like that but the problem is in almost every case by the time you learn about something it's already too late
 
@jesse_b Not true of this site, at least per my observation.
In India, the finance people ignore everything that isn't already quite large.
But you do have to work quite hard to stay ahead of the curve, it's true. There are so many companies.
 
Yeah and there are always exceptions. Peter Lynch often talks about walmart and how shortly after it went public it made investors something like 40x their money and everyone thought that was going to be the top. If you invested after it went up 40x you would have made 100x your money
 
For example, the first stock I bought late last year was at around Rs 40 when I saw it. It was clear that it was ridiculously underpriced. I thought it would go to at least 60. In the event, it went to around 62, for no good reason that I could see. Then dropped down to 55. But to be clear, I was thinking 60 eventually, once things improved. It was a media (newspaper) company, which had taken quite a beating from the pandemic.
 
But generally if someone finds a company under current "intrinsic value" it quickly gets bought up, that isn't to say it wont continue to grow at unpredicable rates
 
6:59 PM
Anyway, I still don't know why it went from 40 to 60.
Actually, it went from 40 to 60 when the P/E has got worse. Because bad results kept coming in. Weird.
 
Most people buy because something is going up and sell because it is going down. That is the main lesson of "the intelligent investor" do the opposite of that. Be greedy when others are fearful and fearful when others are greedy
 
Still holding for now. Just curious to see what happens. I bought a few stocks last year and early this year. Just as an experiment.
 
Most people really don't look at the fundamentals at all, I had a close friend telling me about "roblox" yesterday and his whole argument for why it is a "good buy" is that it has gone up 10% this week
 
@jesse_b Well, assuming the stock isn't crashing because of fraud or something. Or because the business is collapsing. You do need to know what is going on with the company.
In the case of this company, it was clearly doing just fine. But it had taken a beating. Advertising revenue was way down. This was in North India.
This was a very obvious example. Mostly they aren't so obvious.
The main problem is that there is just too much to keep track of. I'd like the data all conveniently in my computer. It would make it much much easier to track.
This company also started doing a stock buyback at around 60. I read the theory that was keeping the price propped up. I don't see why, but I don't understand much about how these things work.
Anyway, the stock buyback will end eventually, and we'll see if the price crashes. I would expect is eventually to go back to a coasting range of around 100, which is where it's been historically.
 
stock buybacks raise prices for at least two reasons: 1) All the stocks they buy get taken out of "shares outstanding" So if they had 10 shares at $10 each they have a total market cap of $100, but if they buy 2 of those shares back there are only 8 shares outstanding now so the market cap drops to $80. If you feel that company is actually worth $100 the 8 shares would have to rise to $12.5 to bring the cap back to intrinsic value
2) it shows that the company trusts its own growth enough to invest in itself and therefore increases public perception of it
 
7:06 PM
> The darlings of Wall Street until March of this year, dot-com companies have fallen on hard times. What do you think of the struggles of the New Economy? "Dot-com is so 1999. I'm putting all my money into dot-org stocks." Bill Vander Heyden, Roofer. The Onion
 
@jesse_b Sure, but they are only buying back a small fraction of the stock at Rs 60.
 
heh
 
Obviously, it would make the price go up a bit, but not by much.
@jesse_b I don't see why anyone would care.
 
@FaheemMitha what companies do with their own stock is very closely watched. If "insiders" are selling stock at unusual rates it lowers the price too.
 
@jesse_b Sure, but they're just buying up this stock because they have the money.
It doesn't make it more valuable, as far as I can tell.
Though, like I said, it was obviously undervalued. Less so now, of course.
 
7:12 PM
@FaheemMitha What companies do with their cash is very important. They often have a lot more opportunities for sound investments than we do so if they decide that investing in themselves is the best option for them it signals that it may be a good option for you too
 
Well, time to head bedwards. Nice chatting with you.
@jesse_b Well, fair enough. I don't know what others are thinking.
 
@FaheemMitha Goodnight
 

« first day (3869 days earlier)      last day (36 days later) »